# Schema

The entire GraphQL schema is available to fetch from the API itself. It's called [introspection](https://graphql.org/learn/introspection/).

As with every other query, introspection of the Ergonode API requires [authentication](/graphql/guides/authentication.md).

The simplest way to discover the GraphQL API is to use supporting HTTP clients like [Insomnia](https://insomnia.rest/). On one hand, they do support scoping through documentation schema, and on the other provide autocomplete functionality which makes writing queries really straightforward.

Alternatively, in order to obtain the full types definition download the schema

{% file src="/files/ESY9YOpdzb6YFQYEtgQH" %}

or just query the API:

```graphql
{
  __schema {
    queryType {
      name
    }
    mutationType {
      name
    }
    subscriptionType {
      name
    }
    types {
      ...FullType 
    }
    directives {
      name
      description
      locations
      args {
        ...InputValue 
      }
    }
  }
}
fragment FullType on __Type {
  kind
  name
  description
  fields(includeDeprecated: true) {
    name
    description
    args {
      ...InputValue 
    } 
    type {
      ...TypeRef
    }
    isDeprecated
    deprecationReason
  }
  inputFields {
    ...InputValue
  }
  interfaces {
    ...TypeRef
  }
  enumValues(includeDeprecated: true) {
    name
    description
    isDeprecated
    deprecationReason
  }
  possibleTypes {
    ...TypeRef 
  }
}
fragment InputValue on __InputValue {
  name
  description
  type {
    ...TypeRef 
  }
  defaultValue
}
fragment TypeRef on __Type {
  kind
  name
  ofType {
    kind
    name
    ofType {
      kind
      name
      ofType {
        kind
        name
        ofType
        {
          kind
          name
          ofType {
            kind
            name
            ofType {
              kind
              name
              ofType {
                kind
                name
              }
            }
          }
        }
      }
    }
  }
}
```

Types reference:

* [Queries](/graphql/overview/schema/queries.md)
* [Mutations](/graphql/overview/schema/mutations.md)
* [Objects](/graphql/overview/schema/objects.md)
* [Interfaces](/graphql/overview/schema/interfaces.md)
* [Scalars](/graphql/overview/schema/scalars.md)
* [Input objects](/graphql/overview/schema/input-objects.md)
* [Enums](/graphql/overview/schema/enums.md)
* [Unions](/graphql/overview/schema/unions.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ergonode.com/graphql/overview/schema.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
