avatar imageOska Ng

Go Graph Loader

By Oska Ng on Oct 1, 2022
go-graph-loader

The Go Graph Loader is a plugin designed to load GraphQL by resolver and process scalar types using Go struct definitions instead of schema typing. It also includes simple extensions like a validator. Auto-generated documentation is supported with magicdoc for the Go Graph Loader.

Key Feature Highlights

  1. Pre Resolver & Data Resolver Method Signature
  2. Model Field Resolver to support displaying field as per input params
  3. Custom Field Resolver to support after load data field
  4. Error & Debugging Footprint

Pre Resolver Error

2022/10/20 00:21:41 ————————————— Go Graph Loader —————————————
2022/10/20 00:21:41 | Package   | main
2022/10/20 00:21:41 | Struct    | Product
2022/10/20 00:21:41 | Type      | PRE_RESOLVER
2022/10/20 00:21:41 | Signature | func(*main.Product) context.Context
2022/10/20 00:21:41 ———————————————————————————————————————————
panic: go-graph-loader: invalid method signature is using for pre resolver function

Field Resolver Error

2022/10/20 00:18:03 ————————————— Go Graph Loader —————————————
2022/10/20 00:18:03 | Package   | main
2022/10/20 00:18:03 | Struct    | Product
2022/10/20 00:18:03 | Type      | RESOLVER_METHOD
2022/10/20 00:18:03 | Signature | func(*main.Product, *main.ProductNameArgs) (string, error)
2022/10/20 00:18:03 ———————————————————————————————————————————
panic: go-graph-loader: invalid method signature is using for field resolver function

References

  1. Github
© Copyright 2024 by Oska Ng. Built with ❤️