On client I get schema by introspectSchema.
In my app I want to get list of all types which we have in schema, but parse existing object is very hard task.
Is there some good way to do it?
On client I get schema by introspectSchema.
In my app I want to get list of all types which we have in schema, but parse existing object is very hard task.
Is there some good way to do it?
Share Improve this question asked Aug 30, 2018 at 14:48 Alexander KnyazevAlexander Knyazev 2,8924 gold badges18 silver badges27 bronze badges1 Answer
Reset to default 9GraphQL has powerful introspection capabilities built in. To get the names of the types in your schema you can run this GraphQL query:
{
__schema {
types {
name
}
}
}
You can read more about introspection in GraphQL here:
https://graphql/learn/introspection/