graphql/graphql-introspection

Introspection Query

Fetch GraphQL schema details

graphql
schema
introspection

Command

curl -X POST http://localhost:4000/graphql -H 'Content-Type: application/json' -d '{"query":"{ __schema { types { name } } }"}'

Explanation

Retrieves the GraphQL schema structure including all types, queries, and mutations. Useful for exploring API capabilities or generating documentation.

Examples

Get details of User type

{ __type(name: \"User\") { name fields { name type { name } } } }