Skip to content

Generates a graphql server schema using introspection.

License

Notifications You must be signed in to change notification settings

suessflorian/gqlfetch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GQLFetch

GraphQL introspection based schema generator, introspection query document mirrors the graphql-js getIntrospectionQuery document albeit compliant to the June 2018 specification.

Usage

import (
	"github.com/suessflorian/gqlfetch"
)

func main() {
	schema, _ := gqlfetch.BuildClientSchema(ctx, endpoint)
}

Or use as cli tool

Introduced a directory here /gqlfetch which will create a gqlfetch cli tool.

go install github.com/suessflorian/gqlfetch/gqlfetch
# gqlfetch --help
gqlfetch --endpoint "localhost:8080/query" > schema.graphql

If you get an error claiming that gqlfetch cannot be found or is not defined, you may need to add ~/go/bin to your $PATH (MacOS/Linux), or %HOME%\go\bin (Windows).

Roadmap

Hoping to incorporate this into a graphql utility package like gqlparser, enable introspection based type-safe graphql client generation in genqlient and simplify the Service type federated services need to expose to a bramble gateway (improving the schema gathering logic).

Notice

Project not fully mature yet, if you find any issues, please submit an issue.

About

Generates a graphql server schema using introspection.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages