> ## Documentation Index
> Fetch the complete documentation index at: https://docs.learningcommons.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Entities and relationships

> Reference for the Knowledge Graph GraphQL schema (entity and relationship types) and examples of programmatic schema exploration using introspection.

export const GatedWrapper = ({children}) => <div className="eyebrow-callout not-prose rounded-xl border border-gray-200/80 p-5 dark:border-white/10" style={{
  marginBottom: "1rem",
  borderRadius: "4px"
}}>
    <div className="mb-3">
      <Badge color="orange" size="md" icon="lock">
        Gated
      </Badge>
    </div>
    <div className="callout-body text-[15px] leading-relaxed text-gray-700 dark:text-gray-300">
      {children}
    </div>
    <style>{`.callout-body a { text-decoration: underline; text-decoration-color: #178251; }`}</style>
  </div>;

<GatedWrapper>
  Access to this resource is restricted and requires prior approval. In some
  cases, a license may also be required. Contact [support@learningcommons.org
  ↗](mailto:support@learningcommons.org) for information about access and
  eligibility.
</GatedWrapper>

The Knowledge Graph [API](/api-reference/) supports GraphQL introspection, so you can programmatically discover types, fields, and relationships at runtime.

## Explore the schema

Get all available types, explore a specific type (like `Lesson`), and more:

<CodeGroup>
  ```text GraphQL theme={null}
  <!-- Get all available types -->
  query {
    __schema {
      types {
        name
        kind
        description
      }
    }
  }

  <!-- Explore a specific type (e.g., Lesson) -->
  query {
    __type(name: "Lesson") {
      name
      fields {
        name
        type {
          name
          kind
        }
        description
      }
    }
  }

  <!-- Get all available queries -->
  query {
    __schema {
      queryType {
        fields {
          name
          args {
            name
            type {
              name
            }
          }
        }
      }
    }
  }

  <!-- Get all relationship fields on a type -->
  query {
    __type(name: "Lesson") {
      fields {
        name
        type {
          name
          ofType {
            name
          }
        }
      }
    }
  }
  ```

  ```shell cURL theme={null}
  # Get 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
  ```

  ```python Python theme={null}
  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']})")
  ```
</CodeGroup>

## Entities

The GraphQL API includes the following [entities](/knowledge-graph/understanding-knowledge-graph/core-concepts#entities):

| Dataset                                                                                       | Entities                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| :-------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Standards](/knowledge-graph/schema-reference/standards#entities)                             | [`StandardsFramework`](/knowledge-graph/schema-reference/standards#standardsframework), [`StandardsFrameworkItem`](/knowledge-graph/schema-reference/standards#standardsframeworkitem)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| [Learning Components](/knowledge-graph/schema-reference/learning-components#entities)         | [`LearningComponent`](/knowledge-graph/schema-reference/learning-components#learningcomponent)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [Curriculum](/knowledge-graph/schema-reference/curriculum#entities)                           | [`Activity`](/knowledge-graph/schema-reference/curriculum#activity), [`Assessment`](/knowledge-graph/schema-reference/curriculum#assessment), [`ClassroomMaterial`](/knowledge-graph/schema-reference/curriculum#classroommaterial), [`Course`](/knowledge-graph/schema-reference/curriculum#course), [`GlossaryTerm`](/knowledge-graph/schema-reference/curriculum#glossaryterm), [`InstructionalRoutine`](/knowledge-graph/schema-reference/curriculum#instructionalroutine), [`Lesson`](/knowledge-graph/schema-reference/curriculum#lesson), [`LessonGrouping`](/knowledge-graph/schema-reference/curriculum#lessongrouping), [`Material`](/knowledge-graph/schema-reference/curriculum#material) |
| [Instructional practices](/knowledge-graph/schema-reference/instructional-practices#entities) | [`Factor`](/knowledge-graph/schema-reference/instructional-practices#factor), [`LearnerModel`](/knowledge-graph/schema-reference/instructional-practices#learnermodel), [`Strategy`](/knowledge-graph/schema-reference/instructional-practices#strategy)                                                                                                                                                                                                                                                                                                                                                                                                                                              |

## Relationships

The GraphQL API includes the following [relationships](/knowledge-graph/understanding-knowledge-graph/core-concepts#relationships):

| Dataset                                                                                            | Relationships                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| :------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Standards](/knowledge-graph/schema-reference/standards#relationships)                             | [`HasChildProperties`](/knowledge-graph/schema-reference/standards#haschild), [`SupportsProperties`](/knowledge-graph/schema-reference/standards#supports), [`HasEducationalAlignmentProperties`](/knowledge-graph/schema-reference/standards#haseducationalalignment), [`HasStandardAlignmentProperties`](/knowledge-graph/schema-reference/standards#hasstandardalignment)                                                                                                                                                                                                                                                                                                                                                      |
| [Learning Components](/knowledge-graph/schema-reference/learning-components#relationships)         | [`SupportsProperties`](/knowledge-graph/schema-reference/learning-components#supports)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [Learning progressions](/knowledge-graph/schema-reference/learning-progressions#relationships)     | [`BuildsTowardsProperties`](/knowledge-graph/schema-reference/learning-progressions#buildstowards), [`RelatesToProperties`](/knowledge-graph/schema-reference/learning-progressions#relatesto)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [Curriculum](/knowledge-graph/schema-reference/curriculum#relationships)                           | [`HasPartProperties`](/knowledge-graph/schema-reference/curriculum#haspart), [`HasEducationalAlignmentProperties`](/knowledge-graph/schema-reference/curriculum#haseducationalalignment), [`UsesRoutineProperties`](/knowledge-graph/schema-reference/curriculum#usesroutine), [`UsesProperties`](/knowledge-graph/schema-reference/curriculum#uses), [`HasDependencyProperties`](/knowledge-graph/schema-reference/curriculum#hasdependency), [`ReferencesProperties`](/knowledge-graph/schema-reference/curriculum#references), [`MutuallyExclusiveWithProperties`](/knowledge-graph/schema-reference/curriculum#mutuallyexclusivewith), [`HasReferenceProperties`](/knowledge-graph/schema-reference/curriculum#relationships) |
| [Instructional practices](/knowledge-graph/schema-reference/instructional-practices#relationships) | [`HasFactorProperties`](/knowledge-graph/schema-reference/instructional-practices#hasfactor), [`HasStrategyProperties`](/knowledge-graph/schema-reference/instructional-practices#hasstrategy), [`InteractsWithFactorProperties`](/knowledge-graph/schema-reference/instructional-practices#interactswithfactor), [`TargetsFactorProperties`](/knowledge-graph/schema-reference/instructional-practices#targetsfactor), [`RelevantToStandardProperties`](/knowledge-graph/schema-reference/instructional-practices#relevanttostandard)                                                                                                                                                                                            |
