Abiral
Abiral

Reputation: 161

How to use Use Graph QL introspection effectively?

I have been trying to learn about Graph-QL interpolation recently, however the official documentation was not helpful enough for me. Is there any way to find all the fields(its subfields), the argument it takes and various other input that could be passed into Graph-QL endpoint ?

Upvotes: 1

Views: 381

Answers (1)

helfer
helfer

Reputation: 7172

Yes, check out the introspection query that comes with graphql-js here. You can use this query to create a complete copy of the schema on the client, minus the resolve functions, which are implementation specific.

PS: It's worth pointing out that due to a limitation of GraphQL the introspection query only goes 6 levels deep for nested arrays, but that should be enough for just about anyone.

Upvotes: 1

Related Questions