Skip to main content
For the full GraphQL schema please reference: Knowledge Graph GraphQL Schema. In addition, the API supports GraphQL introspection, allowing you to explore available types, fields, and relationships dynamically.

Discover Available Types

query {
  __schema {
    types {
      name
      kind
      description
    }
  }
}

Explore a Specific Type

query {
  __type(name: "Lesson") {
    name
    fields {
      name
      type {
        name
        kind
      }
      description
    }
  }
}

Discover Available Queries

query {
  __schema {
    queryType {
      fields {
        name
        args {
          name
          type {
            name
          }
        }
      }
    }
  }
}

Explore Relationship Fields

query {
  __type(name: "Lesson") {
    fields {
      name
      type {
        name
        ofType {
          name
        }
      }
    }
  }
}
Look for fields starting with “has” or ending with relationship patterns to understand available connections.

Using cURL for Schema Exploration

# Discover all available types
curl -X POST \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{"query":"{ __schema { types { name kind } } }"}' \
  https://cumtxmqb68.execute-api.us-west-2.amazonaws.com/staging/v1.0.0/graphql
# Explore a specific type (e.g., Lesson)
curl -X POST \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{"query":"{ __type(name: \"Lesson\") { fields { name type { name } } } }"}' \
  https://cumtxmqb68.execute-api.us-west-2.amazonaws.com/staging/v1.0.0/graphql

Using Python for Schema Exploration

from gql import Client, gql

# Get all available types
schema_query = gql("""
    query {
      __schema {
        types {
          name
          kind
          fields {
            name
            type {
              name
            }
          }
        }
      }
    }
""")

result = client.execute(schema_query)
for type_info in result["__schema"]["types"]:
    if not type_info["name"].startswith("__"):  # Skip introspection types
        print(f"Type: {type_info['name']} ({type_info['kind']})")