gqlparser icon indicating copy to clipboard operation
gqlparser copied to clipboard

Feature Request: Add utilities similar to graphql-js

Open abhimanyusinghgaur opened this issue 5 years ago • 4 comments

graphql-js has some utilities specified here: https://graphql.org/graphql-js/utilities/ It would be very nice for gqlparser also to support those utilities.

For example: something like buildClientSchema is very useful if you want to just re-create ast.Schema from introspection response of a server.

abhimanyusinghgaur avatar May 05 '20 20:05 abhimanyusinghgaur

@vektah @vvakame any thoughts? I may not know if some of those utilities are already there in gqlparser, but AFAIK buildClientSchema doesn't exist here.

abhimanyusinghgaur avatar May 05 '20 20:05 abhimanyusinghgaur

Nice feature to generate golang client code. Currently, I have to use https://github.com/prisma-labs/get-graphql-schema, to generate IDL file from server, and parse it to ast.Schema. If gqlparse supports buildClientSchema it helps a lot, to make a pure golang tool.

unlinking avatar Jun 21 '20 16:06 unlinking

I'll take a gander, recently did something here: https://github.com/suessflorian/gqlfetch, I reckon we can unmarshal a introspection result directly into an ast.Schema.

suessflorian avatar Nov 12 '21 20:11 suessflorian

@suessflorian thanks,you give me a big favor .

AnsonCode avatar Nov 06 '22 12:11 AnsonCode