A Golang client side code/SDK generator for consuming the GraphQL APIs.
go build gqlclientgen
gqlclientgen -config_path=<path of the directory containing the config.yaml> -plugin_path=<path of the directory where all the plugin of custom scalars> -query_path=<path of the all operations with fragments>
The Custom Scalar Plugin should implement the methods:
Type() string // type of the custom scalar
Code() *jen.Statement // code of dave/jennifer here
The File name of the custom scalar plugin i.e TimeStamp.go
For dave/jennifer code reference please refer here
This file should be built in a form of plugin using the following command
go build -buildmode=plugin TimeStamp.go TimeStamp.so
# Name of the package for generated client/SDK
packageName: "gql"
# Path of directory where generated code will be placed
outputDirectory: "/somedir"
# Default
sourceType: "file"
# Path of the graphql schema (IDL) file
sourceFilePath: "/somedir/schema.graphqls"
# URL of the graphql server with the introspection context
url: "gql"
- Golang model generation
- Query
- Mutations
- Scalars - Map, Any, ID
- Support for custom scalars
- GraphQL directives
- GraphQL fragments
- Subscriptions
- Load schema from URL