Introspection in GraphQL

__Schema

The type __Schema is the one that defines the schema the API provides. Its type is defined as the following:

Schema type definition

__type

The __type represents the types defined in the system. We can query the type of an object and get its information.

GraphiQL querying the type of the User using Github API v4 (Try it!)

__typename

Deprecations

Another topic that comes “for free” by using introspection is deprecations. GraphQL fields indicate whether or not they are deprecated along with their reason.

GraphiQL querying the type of the Organization using Github API v4 (Try it!)
GraphQL Voyager using Shopify Storefront API

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store