> ## 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.

# Query patterns

> Learn common GraphQL query patterns for the Knowledge Graph API, including basic node queries, relationship queries, filtering, and Illustrated Mathematics curriculum-specific examples.

export const GatedCallout = ({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>;

export const EarlyAccessCallout = ({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="green" size="md" icon="flask">
        Early access
      </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>;

<GatedCallout>
  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.
</GatedCallout>

## Basic node queries

### Fetch lessons by grade level

```text theme={null}
query {
  lessons(where: { gradeLevel_INCLUDES: "K" }, limit: 10) {
    identifier
    name
    gradeLevel
    courseCode
    timeRequired
  }
}
```

## Relationship queries

### Find activities and their materials

```text theme={null}
query {
  activities(limit: 5) {
    identifier
    name
    hasPartMaterials {
      identifier
      name
      materialType
      content
    }
  }
}
```

### Get educational alignments

```text theme={null}
query {
 lessons(limit: 3) {
   identifier
   name
   hasEducationalAlignmentStandardsFrameworkItems {
     identifier
     description
     gradeLevel
   }
 }
}
```

## Advanced filtering

### Multiple grade levels

```text theme={null}
query {
  lessons(where: { 
    gradeLevel_INCLUDES: "K"
  }, limit: 10) {
    identifier
    name
    gradeLevel
  }
}
```

### Filter by subject and author

```text theme={null}
query {
  courses(where: { 
    academicSubject: "Mathematics",
    author_CONTAINS: "Illustrative Mathematics"
  }, limit: 5) {
    identifier
    name
    author
    academicSubject
  }
}
```

## Illustrated Math (IM) curriculum course level queries

### List all courses in IM

Return all IM courses in the Knowledge Graph.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { author: "Illustrative Mathematics" }) { name identifier gradeLevel } }
  ```

  ```cypher Cypher theme={null}
  MATCH (c:Course {author:'Illustrative Mathematics'}) RETURN c.name, c.identifier, c.gradeLevel
  ```
</CodeGroup>

### List all units in a course

Get all units for Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { hasPartLessonGroupings(where: { curriculumLabel: "Unit" }) { ordinalName name identifier } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author:'Illustrative Mathematics'})-[:hasPart]->(u:LessonGrouping {curriculumLabel: "Unit"}) RETURN u.ordinalName, u.name, u.identifier
  ```
</CodeGroup>

### List all sections in a course

Return all sections for each Unit in grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { hasPartLessonGroupings(where: { curriculumLabel: "Unit" }) { ordinalName hasPartLessonGroupings(where: { curriculumLabel: "Section" }) { ordinalName name identifier } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author:'Illustrative Mathematics'})-[:hasPart]->(u:LessonGrouping {curriculumLabel: "Unit"}) -[:hasPart]->(s:LessonGrouping {curriculumLabel: "Section"}) RETURN u.ordinalName AS unit, s.ordinalName AS section, s.name AS sectionName, s.identifier AS sectionId
  ```
</CodeGroup>

### List all lessons in a course

Return all lessons for each section of each unit in Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { hasPartLessonGroupings(where: { curriculumLabel: "Unit" }) { ordinalName hasPartLessonGroupings(where: { curriculumLabel: "Section" }) { ordinalName hasPartLessons { ordinalName name identifier } } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author:'Illustrative Mathematics'})-[:hasPart]->(u:LessonGrouping {curriculumLabel: "Unit"}) -[:hasPart]->(s:LessonGrouping {curriculumLabel: "Section"}) -[:hasPart]->(l:Lesson) RETURN u.ordinalName AS unit, s.ordinalName AS section, l.ordinalName AS lesson, l.name AS lessonName, l.identifier AS lessonId
  ```
</CodeGroup>

### List all instructional routines in a course

Return all instructional routines used in Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { usesRoutineInstructionalRoutines { name identifier } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author:'Illustrative Mathematics'})-[:usesRoutine]->(ir:InstructionalRoutine) RETURN DISTINCT ir.name, ir.identifier
  ```
</CodeGroup>

### List all common core math standards (CCSS) aligned to a course

Return all CCSS math standards that have educational alignment with Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses( where: { name: "Grade 6" author: "Illustrative Mathematics" } ) { hasEducationalAlignmentStandardsFrameworkItemsConnection( where: { node: { statementType: "Standard" } } ) { edges { properties { curriculumAlignmentType } node { statementCode description identifier } } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author:'Illustrative Mathematics'})-[a:hasEducationalAlignment]->(cfi:StandardsFrameworkItem) WHERE cfi.statementType = "Standard" RETURN DISTINCT cfi.statementCode, cfi.description, cfi.identifier, a.curriculumAlignmentType
  ```
</CodeGroup>

### Get the course guide for a course

Return course guide information for grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { hasPartMaterials(where: { name: "Course Guide" }) { identifier content } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author:'Illustrative Mathematics'})-[:hasPart]->(m:Material) WHERE m.name = 'Course Guide' RETURN m.identifier, m.content
  ```
</CodeGroup>

### Get the course by the course ID

Return metadata and content for the course ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { author: "Illustrative Mathematics", identifier: "im:01dac62a-f836-5da5-bae4-1df14f1dfa8f" }) { name courseCode hasPartMaterials { content } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (c:Course {author:'Illustrative Mathematics', identifier: "im:01dac62a-f836-5da5-bae4-1df14f1dfa8f"})-[:hasPart]-(m:Material) RETURN c.name, c.courseCode, m.content
  ```
</CodeGroup>

## IM unit-level queries

### List all sections in a unit

Return all sections for Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1", curriculumLabel: "Unit" }) { hasPartLessonGroupings(where: { curriculumLabel: "Section" }) { ordinalName name identifier } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author: "Illustrative Mathematics"}) -[:hasPart]->(u:LessonGrouping {ordinalName: "Unit 1", curriculumLabel: "Unit"}) -[:hasPart]->(s:LessonGrouping {curriculumLabel: "Section"}) RETURN s.ordinalName, s.name, s.identifier
  ```
</CodeGroup>

### List all lessons in a unit

Return all lessons for each Section for Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1", curriculumLabel: "Unit" }) { hasPartLessonGroupings(where: { curriculumLabel: "Section" }) { ordinalName hasPartLessons { ordinalName name identifier } } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author: "Illustrative Mathematics"}) -[:hasPart]->(u:LessonGrouping {ordinalName: "Unit 1", curriculumLabel: "Unit"}) -[:hasPart]->(s:LessonGrouping {curriculumLabel: "Section"}) -[:hasPart]->(l:Lesson) RETURN s.ordinalName AS section, l.ordinalName AS lesson, l.name AS lessonName, l.identifier as lessonId
  ```
</CodeGroup>

### List all common core math standards aligned to a unit

Return all the CCSS math standards that have educational alignment with Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses( where: { name: "Grade 6" author: "Illustrative Mathematics" } ) { hasPartLessonGroupings( where: { ordinalName: "Unit 1" curriculumLabel: "Unit" } ) { hasEducationalAlignmentCfItemsConnection( where: { node: { CASE_CFItemType: "Standard" } } ) { edges { properties { curriculumAlignmentType } node { CASE_humanCodingScheme CASE_fullStatement identifier } } } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author: "Illustrative Mathematics"}) -[:hasPart]->(u:LessonGrouping {ordinalName: "Unit 1", curriculumLabel: "Unit"}) -[a:hasEducationalAlignment]->(cfi:CFItem) WHERE cfi.`CASE:CFItemType` = "Standard" RETURN DISTINCT cfi.`CASE:humanCodingScheme`, cfi.`CASE:fullStatement`, cfi.identifier, a.`relationship_properties.curriculumAlignmentType`
  ```
</CodeGroup>

### List the prerequisite units for a unit

Return the prerequisite units for Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { lessonGroupings(where: { ordinalName: "Unit 1", courseCode: "im360:6" }) { lessonGroupingshasDependency { ordinalName name identifier } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (u:LessonGrouping {ordinalName: "Unit 1", courseCode: "im360:6"}) <-[:hasDependency]-(prereq:LessonGrouping) RETURN prereq.ordinalName, prereq.name, prereq.identifier
  ```
</CodeGroup>

### List the dependent units for a unit

Return units depending on Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { lessonGroupings(where: { ordinalName: "Unit 1", courseCode: "im360:6" }) { hasDependencyLessonGroupings { ordinalName name identifier } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (u:LessonGrouping {ordinalName: "Unit 1", courseCode: "im360:6"}) -[:hasDependency]->(dep:LessonGrouping) RETURN dep.ordinalName, dep.name, dep.identifier
  ```
</CodeGroup>

### Get the family materials of a unit

Return the family material information for Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1" }) { hasPartMaterials(where: { name_CONTAINS: "Family Materials" }) { name identifier content } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author: "Illustrative Mathematics"}) -[:hasPart]->(u:LessonGrouping {ordinalName: "Unit 1"}) -[:hasPart]->(m:Material) WHERE m.name CONTAINS 'Family Materials' RETURN m.name, m.identifier, m.content
  ```
</CodeGroup>

### Get the unit overview of a unit

Return the unit overview information for Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1" }) { hasPartMaterials(where: { name_CONTAINS: "Overview" }) { name identifier } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author: "Illustrative Mathematics"}) -[:hasPart]->(u:LessonGrouping {ordinalName: "Unit 1"}) -[:hasPart]->(m:Material) WHERE m.name CONTAINS 'Overview' RETURN m.name, m.identifier
  ```
</CodeGroup>

### List the end-of-unit assessments of a unit

Return the end-of-unit assessments for Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1" }) { hasPartAssessments(where: { curriculumLabel_CONTAINS: "End-of-Unit" }) { name identifier } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author: "Illustrative Mathematics"}) -[:hasPart]->(u:LessonGrouping {ordinalName: "Unit 1"}) -[:hasPart]->(a:Assessment) WHERE a.curriculumLabel CONTAINS "End-of-Unit" RETURN a.name, a.identifier
  ```
</CodeGroup>

### List the *Check Your Readiness* assessments for a unit

Return the *Check Your Readiness* assessments for Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1" }) { hasPartAssessments(where: { curriculumLabel_CONTAINS: "Check Your Readiness" }) { name identifier } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author: "Illustrative Mathematics"}) -[:hasPart]->(u:LessonGrouping {ordinalName: "Unit 1"}) -[:hasPart]->(a:Assessment) WHERE a.curriculumLabel CONTAINS "Check Your Readiness" RETURN a.name, a.identifier
  ```
</CodeGroup>

### List the mid-unit assessments of a unit

Return the mid-unit assessments for Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1" }) { hasPartAssessments(where: { curriculumLabel_CONTAINS: "Mid-Unit" }) { name identifier } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author: "Illustrative Mathematics"}) -[:hasPart]->(u:LessonGrouping {ordinalName: "Unit 1"}) -[:hasPart]->(a:Assessment) WHERE a.curriculumLabel CONTAINS "Mid-Unit" RETURN a.name, a.identifier
  ```
</CodeGroup>

### List the glossary terms referenced by a unit

Return the glossary terms referenced by Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1" }) { hasPartLessonGroupings { hasPartLessons { referencesGlossaryTerms { name description identifier } } } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author: "Illustrative Mathematics"}) -[:hasPart]->(u:LessonGrouping {ordinalName: "Unit 1"}) -[:hasPart*]->(l:Lesson)-[:references]->(g:GlossaryTerm) RETURN DISTINCT g.name, g.description, g.identifier
  ```
</CodeGroup>

### Get the unit by unit ID

Return metadata and content for the unit ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { lessonGroupings(where: { identifier: "im:a0e15ae9-dd70-5df0-93ad-9d6b99fc5ad2" }) { name ordinalName hasPartMaterials { content } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (u:LessonGrouping {identifier: "im:a0e15ae9-dd70-5df0-93ad-9d6b99fc5ad2"}) -[:hasPart]-(m:Material) RETURN u.name, u.ordinalName, m.content
  ```
</CodeGroup>

## IM section-level queries

### List all lessons in a section

Return all lessons for Section A of Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1", curriculumLabel: "Unit" }) { hasPartLessonGroupings(where: { ordinalName: "Section A", curriculumLabel: "Section" }) { hasPartLessons { ordinalName name identifier } } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author: "Illustrative Mathematics"}) -[:hasPart]->(u:LessonGrouping {ordinalName: "Unit 1", curriculumLabel: "Unit"}) -[:hasPart]->(s:LessonGrouping {ordinalName: "Section A", curriculumLabel: "Section"}) -[:hasPart]->(l:Lesson) RETURN l.ordinalName, l.name, l.identifier
  ```
</CodeGroup>

### List all common core math standards aligned to a section

Get all the CCSS math standards that have educational alignment with Section A of Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses( where: { name: "Grade 6", author: "Illustrative Mathematics" } ) { hasPartLessonGroupings( where: { ordinalName: "Unit 1", curriculumLabel: "Unit" } ) { hasPartLessonGroupings( where: { ordinalName: "Section A", curriculumLabel: "Section" } ) { hasEducationalAlignmentStandardsFrameworkItemsConnection( where: { node: { statementType: "Standard" } } ) { edges { properties { curriculumAlignmentType } node { statementCode description identifier } } } } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author: "Illustrative Mathematics"}) -[:hasPart]->(u:LessonGrouping {ordinalName: "Unit 1", curriculumLabel: "Unit"}) -[:hasPart]->(s:LessonGrouping {ordinalName: "Section A", curriculumLabel: "Section"}) -[a:hasEducationalAlignment]->(cfi:StandardsFrameworkItem) WHERE cfi.statementType = "Standard" RETURN DISTINCT cfi.statementCode, cfi.description, cfi.identifier, a.curriculumAlignmentType
  ```
</CodeGroup>

### Get the section narrative of a section

Return the section narrative information for section A of unit 1 of grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1" }) { hasPartLessonGroupings(where: { ordinalName: "Section A" }) { hasPartMaterials { name identifier content } } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author: "Illustrative Mathematics"}) -[:hasPart]->(u:LessonGrouping {ordinalName: "Unit 1"}) -[:hasPart]->(s:LessonGrouping {ordinalName: "Section A"}) -[:hasPart]->(m:Material) RETURN m.name, m.identifier, m.content
  ```
</CodeGroup>

### List the section checkpoint assessment of a section

Return the section checkpoint assessment for Section A of Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6", author: "Illustrative Mathematics" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1" }) { hasPartLessonGroupings(where: { ordinalName: "Section A" }) { hasPartAssessments(where: { curriculumLabel_CONTAINS: "Checkpoint" }) { name identifier } } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:Course {name: "Grade 6", author: "Illustrative Mathematics"}) -[:hasPart]->(u:LessonGrouping {ordinalName: "Unit 1"}) -[:hasPart]->(s:LessonGrouping {ordinalName: "Section A"}) -[:hasPart]->(a:Assessment) WHERE a.curriculumLabel CONTAINS "Checkpoint" RETURN a.name, a.identifier
  ```
</CodeGroup>

### Get the section-by-section ID

Return metadata and content for the section ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { lessonGroupings(where: { identifier: "im:0908dab1-c834-5194-947b-492a1348a403" }) { identifier name ordinalName hasPartMaterials { content } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (s:LessonGrouping {identifier: "im:0908dab1-c834-5194-947b-492a1348a403"})-[:hasPart]-(m:Material) RETURN s.identifier, s.name, s.ordinalName, m.content
  ```
</CodeGroup>

## IM lesson-level queries

### List all activities of a lesson

Return all activities that are part of lesson 1, section A, unit 1 of grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1" }) { hasPartLessonGroupings(where: { ordinalName: "Section A" }) { hasPartLessons(where: { ordinalName: "Lesson 1" }) { hasPartActivities { name identifier } } } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (c:Course {name: "Grade 6"})-[:hasPart]->(u:LessonGrouping {ordinalName:"Unit 1"}) -[:hasPart]->(s:LessonGrouping {ordinalName:"Section A"})-[:hasPart]->(l:Lesson {ordinalName: "Lesson 1"}) -[:hasPart]->(a:Activity) RETURN a.name, a.identifier
  ```
</CodeGroup>

### List all cool-down assessments in a lesson

Get cool-down assessments of Lesson 1, Section A, Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1" }) { hasPartLessonGroupings(where: { ordinalName: "Section A" }) { hasPartLessons(where: { ordinalName: "Lesson 1" }) { hasPartAssessments(where: { curriculumLabel: "Cool-down" }) { name identifier } } } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (c:Course {name: "Grade 6"})-[:hasPart]->(u:LessonGrouping {ordinalName:"Unit 1"}) -[:hasPart]->(s:LessonGrouping {ordinalName:"Section A"})-[:hasPart]->(l:Lesson {ordinalName: "Lesson 1"}) -[:hasPart]->(a:Assessment) WHERE a.curriculumLabel = "Cool-down" RETURN a.name, a.identifier
  ```
</CodeGroup>

### List all practice problems in a lesson

Get practice problems of Lesson 1, Section A, Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1" }) { hasPartLessonGroupings(where: { ordinalName: "Section A" }) { hasPartLessons(where: { ordinalName: "Lesson 1" }) { hasPartAssessments(where: { curriculumLabel: "Practice Problems" }) { name identifier } } } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (c:Course {name: "Grade 6"})-[:hasPart]->(u:LessonGrouping {ordinalName:"Unit 1"}) -[:hasPart]->(s:LessonGrouping {ordinalName:"Section A"})-[:hasPart]->(l:Lesson {ordinalName: "Lesson 1"}) -[:hasPart]->(a:Assessment) WHERE a.curriculumLabel = "Practice Problems" RETURN a.name, a.identifier
  ```
</CodeGroup>

### List all classroom materials used in a lesson

Get all classroom materials used in Lesson 1, Section A, Unit 1 of Grade 3.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 3" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1" }) { hasPartLessonGroupings(where: { ordinalName: "Section A" }) { hasPartLessons(where: { ordinalName: "Lesson 1" }) { usesClassroomMaterials { name identifier description } } } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (c:Course {name: "Grade 3"})-[:hasPart]->(u:LessonGrouping {ordinalName:"Unit 1"}) -[:hasPart]->(s:LessonGrouping {ordinalName:"Section A"})-[:hasPart]->(l:Lesson {ordinalName: "Lesson 1"}) -[:uses]->(m:ClassroomMaterial) RETURN m.name, m.identifier
  ```
</CodeGroup>

### List all glossary terms referenced by a lesson

Return all glossary terms referenced in Lesson 1, Section A, Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1" }) { hasPartLessonGroupings(where: { ordinalName: "Section A" }) { hasPartLessons(where: { ordinalName: "Lesson 1" }) { referencesGlossaryTerms { name description identifier } } } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (c:Course {name: "Grade 6"})-[:hasPart]->(u:LessonGrouping {ordinalName:"Unit 1"}) -[:hasPart]->(s:LessonGrouping {ordinalName:"Section A"})-[:hasPart]->(l:Lesson {ordinalName: "Lesson 1"}) -[:references]->(g:GlossaryTerm) RETURN g.name, g.identifier
  ```
</CodeGroup>

### List all standards aligned to a lesson

Return all common core standards educationally aligned with Lesson 1, Section A, Unit 1 of Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { courses(where: { name: "Grade 6" }) { hasPartLessonGroupings(where: { ordinalName: "Unit 1" }) { hasPartLessonGroupings(where: { ordinalName: "Section A" }) { hasPartLessons(where: { ordinalName: "Lesson 1" }) { hasEducationalAlignmentStandardsFrameworkItems { identifier description statementCode statementType } } } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (c:Course {name: "Grade 6"})-[:hasPart]->(u:LessonGrouping {ordinalName: "Unit 1"}) -[:hasPart]->(s:LessonGrouping {ordinalName: "Section A"})-[:hasPart]->(l:Lesson {ordinalName: "Lesson 1"}) -[:hasEducationalAlignment]->(cf:StandardsFrameworkItem) RETURN cf.identifier, cf.description, cf.statementCode
  ```
</CodeGroup>

### Get the lesson-by-lesson ID

Return metadata and content for the lesson ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { lessons(where: { author: "Illustrative Mathematics", identifier: "im:3ac685eb-79b3-5c19-952e-c1a71a5017e9" }) { name courseCode hasPartMaterials { content } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (c:Lesson {author:'Illustrative Mathematics', identifier: "im:3ac685eb-79b3-5c19-952e-c1a71a5017e9"})-[:hasPart]-(m:Material) RETURN c.name, c.courseCode, m.content
  ```
</CodeGroup>

## IM activity-level queries

**List all instructional routines in an activity**\
"Which routines are used in activity ID \[xxxxx]?"

<CodeGroup>
  ```graphql GraphQL theme={null}
  { activities(where: { identifier: "im:44adb838-f550-5efc-a875-6a991b52b7ae" }) { usesRoutineInstructionalRoutines { name identifier description } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (a:Activity {identifier: "im:44adb838-f550-5efc-a875-6a991b52b7ae"})-[:usesRoutine]->(r:InstructionalRoutine) RETURN r.name, r.identifier, r.description
  ```
</CodeGroup>

**List all common core math standards aligned to an activity**\
"Return all common core standards educationally aligned with Activity ID \[xxxxx]"

<CodeGroup>
  ```graphql GraphQL theme={null}
  { activities(where: { identifier: "im:44adb838-f550-5efc-a875-6a991b52b7ae" }) { hasEducationalAlignmentStandardsFrameworkItems { identifier description statementCode statementType } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (a:Activity {identifier: "im:44adb838-f550-5efc-a875-6a991b52b7ae"}) -[:hasEducationalAlignment]->(cf:StandardsFrameworkItem) RETURN cf.identifier, cf.description, cf.statementCode
  ```
</CodeGroup>

### Get the activity by its activity ID

Return metadata and content for the activity ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { activities(where: { identifier: "im:44adb838-f550-5efc-a875-6a991b52b7ae" }) { name ordinalName hasPartMaterials { identifier content } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (s:Activity {identifier: "im:44adb838-f550-5efc-a875-6a991b52b7ae"})-[:hasPart]-(m:Material) RETURN m.identifier, s.name, s.ordinalName, m.content
  ```
</CodeGroup>

## Academic standard query patterns

### List all standards documents

Return all standard documents available in the Knowledge Graph.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworks { identifier name } }
  ```

  ```cypher Cypher theme={null}
  MATCH (doc:StandardsFramework) RETURN doc.identifier, doc.name
  ```
</CodeGroup>

### Find documents by subject or state

Return all Math standards documents from California.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworks(where: { academicSubject: "Mathematics", jurisdiction: "California" }) { identifier name } }
  ```

  ```cypher Cypher theme={null}
  MATCH (doc:StandardsFramework) WHERE doc.academicSubject = "Mathematics" AND doc.jurisdiction = "California" RETURN doc.identifier, doc.name
  ```
</CodeGroup>

### Get document by document ID

Return standards document with identifier \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworks(where: { identifier: "2d08331b-3769-5b2b-981c-52b03c5e73d1" }) { identifier name } }
  ```

  ```cypher Cypher theme={null}
  MATCH (doc:StandardsFramework {identifier: "2d08331b-3769-5b2b-981c-52b03c5e73d1"}) RETURN doc.identifier, doc.name
  ```
</CodeGroup>

### Get all standards in a document

Return all standards that are part of a standard document ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworks(where: { identifier: "2d08331b-3769-5b2b-981c-52b03c5e73d1" }) { hasChildStandardsFrameworkItems { identifier description statementType statementCode } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:StandardsFramework {identifier: "2d08331b-3769-5b2b-981c-52b03c5e73d1"})-[:hasChild]->(ci:StandardsFrameworkItem) RETURN ci.identifier, ci.description, ci.statementCode
  ```
</CodeGroup>

### List child standards for a standard

Return all standards that are children of standard ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworkItems(where: { identifier: "ef129d7a-3f29-58ed-80e3-ba5186af5872" }) { hasChildStandardsFrameworkItems { identifier description statementCode } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (:StandardsFrameworkItem {identifier: "ef129d7a-3f29-58ed-80e3-ba5186af5872"})-[:hasChild]->(ci:StandardsFrameworkItem) RETURN ci.identifier, ci.description, ci.statementCode
  ```
</CodeGroup>

### Get the parent standard for a standard

Return the immediate parent standard of standard ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworkItems(where: { hasChildStandardsFrameworkItems_SOME: { identifier: "ef129d7a-3f29-58ed-80e3-ba5186af5872" } }) { identifier description statementCode } }
  ```

  ```cypher Cypher theme={null}
  MATCH (ci:StandardsFrameworkItem)-[:hasChild]->(:StandardsFrameworkItem {identifier: "ef129d7a-3f29-58ed-80e3-ba5186af5872"}) RETURN ci.identifier, ci.description, ci.statementCode
  ```
</CodeGroup>

### Get the standard-by-standard code

Return content and metadata for standard code '7.G.A.1."

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworkItems(where: { statementCode: "7.G.A.1" }) { identifier description statementType } }
  ```

  ```cypher Cypher theme={null}
  MATCH (ci: StandardsFrameworkItem{statementCode: "7.G.A.1"}) RETURN ci.identifier, ci.description
  ```
</CodeGroup>

### Get a standard-by-standard ID

Return content and metadata for standard ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworkItems(where: { identifier: "ef129d7a-3f29-58ed-80e3-ba5186af5872" }) { identifier description statementType statementCode } }
  ```

  ```cypher Cypher theme={null}
  MATCH (ci:StandardsFrameworkItem {identifier: "ef129d7a-3f29-58ed-80e3-ba5186af5872"}) RETURN ci.identifier, ci.description, ci.statementCode
  ```
</CodeGroup>

### Get standards for a grade

Return all math standards from grade level 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworkItems(where: { gradeLevel_INCLUDES: "6", academicSubject: "Mathematics" }) { identifier statementCode description } }
  ```

  ```cypher Cypher theme={null}
  MATCH (cfi:StandardsFrameworkItem) WHERE "6" in cfi.gradeLevel AND cfi.academicSubject = 'Mathematics' RETURN cfi.identifier, cfi.statementCode, cfi.description
  ```
</CodeGroup>

## Learning progression query patterns

### List standards that build toward a standard

Return all standards that build toward standard 6.NS.B.3.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworkItems( where: { buildsTowardsStandardsFrameworkItems_SOME: { statementCode: "6.NS.B.3" } } ) { identifier statementCode description } }
  ```

  ```cypher Cypher theme={null}
  MATCH (s:StandardsFrameworkItem)-[:buildsTowards]->(d:StandardsFrameworkItem) WHERE d.statementCode = "6.NS.B.3" RETURN s.identifier, s.statementCode, s.description
  ```
</CodeGroup>

### List standards that are related to a standard

Return all standards that relate to standard 6.NS.B.3.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworkItems( where: { relatesToStandardsFrameworkItems_SOME: { statementCode: "5.NBT.B.7" } } ) { identifier statementCode description } }
  ```

  ```cypher Cypher theme={null}
  MATCH (s:StandardsFrameworkItem)-[:relatesTo]->(d:StandardsFrameworkItem) WHERE d.statementCode = "5.NBT.B.7" RETURN s.identifier, s.statementCode, s.description
  ```
</CodeGroup>

## Learning Component Queries

### List all learning components

Return a list of all learning components in Knowledge Graph.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { learningComponents { identifier description academicSubject } }
  ```

  ```cypher Cypher theme={null}
  MATCH (n:LearningComponent) RETURN n.identifier, n.description, n.academicSubject
  ```
</CodeGroup>

### Get learning component by ID

Return a learning component that matches the ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { learningComponents(where: { identifier: "4219c4aa-da1f-5f0f-bca8-0482f1d5a02b" }) { identifier description academicSubject } }
  ```

  ```cypher Cypher theme={null}
  MATCH (n:LearningComponent{identifier: "4219c4aa-da1f-5f0f-bca8-0482f1d5a02b"}) RETURN n.identifier, n.description, n.academicSubject
  ```
</CodeGroup>

## Standards + curriculum query patterns

### List all courses aligned to a specific standard

Return the courses aligned with standard ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworkItems(where: { identifier: "62508493-c9ae-5c4a-b317-94d80fe6d775" }) { courseshasEducationalAlignment { name identifier } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (c:Course)-[:hasEducationalAlignment]->(:StandardsFrameworkItem {identifier: "62508493-c9ae-5c4a-b317-94d80fe6d775"}) RETURN c.name, c.identifier
  ```
</CodeGroup>

### List all units aligned to a specific standard

Return the units aligned with standard ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworkItems(where: { identifier: "62508493-c9ae-5c4a-b317-94d80fe6d775" }) { lessonGroupingshasEducationalAlignment(where: { curriculumLabel: "Unit" }) { name ordinalName identifier } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (u:LessonGrouping {curriculumLabel: "Unit"})-[:hasEducationalAlignment]->(:StandardsFrameworkItem {identifier: "62508493-c9ae-5c4a-b317-94d80fe6d775"}) RETURN u.name, u.identifier
  ```
</CodeGroup>

### List all sections aligned to a specific standard

Return the sections aligned with standard ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworkItems(where: { identifier: "62508493-c9ae-5c4a-b317-94d80fe6d775" }) { lessonGroupingshasEducationalAlignment(where: { curriculumLabel: "Section" }) { name ordinalName identifier } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (s:LessonGrouping {curriculumLabel: "Section"})-[:hasEducationalAlignment]->(:StandardsFrameworkItem {identifier: "62508493-c9ae-5c4a-b317-94d80fe6d775"}) RETURN s.name, s.identifier
  ```
</CodeGroup>

### List all lessons aligned to a specific standard

Return the lessons are aligned with standard ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworkItems(where: { identifier: "62508493-c9ae-5c4a-b317-94d80fe6d775" }) { lessonshasEducationalAlignment { name ordinalName identifier } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (l:Lesson)-[:hasEducationalAlignment]->(:StandardsFrameworkItem {identifier: "62508493-c9ae-5c4a-b317-94d80fe6d775"}) RETURN l.name, l.identifier
  ```
</CodeGroup>

### List all activities aligned to a specific standard

Return the activities are aligned with the standard ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworkItems(where: { identifier: "62508493-c9ae-5c4a-b317-94d80fe6d775" }) { activitieshasEducationalAlignment { name ordinalName identifier } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (a:Activity)-[:hasEducationalAlignment]->(:StandardsFrameworkItem {identifier: "62508493-c9ae-5c4a-b317-94d80fe6d775"}) RETURN a.name, a.identifier
  ```
</CodeGroup>

### List all assessments aligned to a specific standard

Return the assessments aligned with standard ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworkItems(where: { identifier: "6998c1e0-d5d3-5f9b-9bb6-f167772a499f" }) { assessmentshasEducationalAlignment { name identifier } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (assess:Assessment)-[:hasEducationalAlignment]->(:StandardsFrameworkItem {identifier: "6998c1e0-d5d3-5f9b-9bb6-f167772a499f"}) RETURN assess.name, assess.identifier
  ```
</CodeGroup>

## Learning component + standards query patterns

### List all learning components in a grade

Return all learning components that support all standards from Grade 6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworkItems(where: { gradeLevel_INCLUDES: "6" }) { learningComponentssupports { identifier description } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (cfi:StandardsFrameworkItem)-[:supports]-(l:LearningComponent) WHERE "6" in cfi.gradeLevel RETURN l.identifier, l.description
  ```
</CodeGroup>

### List learning components supporting a standard

Return all learning components that support standard ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { standardsFrameworkItems(where: { identifier: "ef129d7a-3f29-58ed-80e3-ba5186af5872" }) { learningComponentssupports { identifier description } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (cfi:StandardsFrameworkItem)-[:supports]-(l:LearningComponent) WHERE cfi.identifier = "ef129d7a-3f29-58ed-80e3-ba5186af5872" RETURN l.identifier, l.description
  ```
</CodeGroup>

### List standard(s) supported by a learning component

Return all standards that are supported by learning component ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { learningComponents(where: { identifier: "0013fbee-3e76-500f-9978-42aa1a65f105" }) { supportsStandardsFrameworkItems { identifier description } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (cfi:StandardsFrameworkItem)-[:supports]-(l:LearningComponent) WHERE l.identifier = "0013fbee-3e76-500f-9978-42aa1a65f105" RETURN cfi.identifier, cfi.description
  ```
</CodeGroup>

## Learning component, standards, IM curriculum query patterns

### List all LCs supporting an IM lesson

Return all learning components that support lesson ID \[xxxxx].

<CodeGroup>
  ```graphql GraphQL theme={null}
  { lessons(where: { identifier: "im:ecf6aa89-0fc9-501c-a4ae-531d9faf8c39" }) { hasEducationalAlignmentStandardsFrameworkItems { learningComponentssupports { identifier description } } } }
  ```

  ```cypher Cypher theme={null}
  MATCH (l:Lesson{identifier:"im:ecf6aa89-0fc9-501c-a4ae-531d9faf8c39"})-[:hasEducationalAlignment]->(c:StandardsFrameworkItem)-[:supports]-(lc:LearningComponent) RETURN lc.identifier, lc.description
  ```
</CodeGroup>

## Standard crosswalk query patterns

### Get all crosswalks

"Return all state to CCSSM standard alignments ordered by Jaccard similarity score.

<CodeGroup>
  ```graphql GraphQL theme={null}
  {
    standardsFrameworkItems {
      statementCode
      jurisdiction
      hasStandardAlignmentStandardsFrameworkItemsConnection {
        edges {
          node {
            statementCode
            jurisdiction
          }
          properties {
            jaccard
            stateLCCount
            ccssLCCount
            sharedLCCount
          }
        }
      }
    }
  }
  ```

  ```cypher Cypher theme={null}
  MATCH (state:StandardsFrameworkItem)-[r:hasStandardAlignment]->(ccss:StandardsFrameworkItem)
  RETURN
    state.statementCode AS state_standard_code,
    state.jurisdiction AS state_jurisdiction,
    ccss.statementCode AS ccss_standard_code,
    ccss.jurisdiction AS ccss_jurisdiction,
    r.jaccard,
    r.stateLCCount,
    r.ccssLCCount,
    r.sharedLCCount
  ORDER BY r.jaccard DESC
  ```
</CodeGroup>

### Get crosswalks for a state

Return all crosswalks for Texas standards to CCSSM with full metadata.

<CodeGroup>
  ```graphql GraphQL theme={null}
  {
    standardsFrameworkItems(
      where: {
        jurisdiction: "Texas"
        academicSubject: "Mathematics"
      }
    ) {
      jurisdiction
      statementCode
      gradeLevel
      description
      academicSubject
      hasStandardAlignmentStandardsFrameworkItemsConnection {
        edges {
          node {
            statementCode
            gradeLevel
            description
            academicSubject
          }
          properties {
            jaccard
            sharedLCCount
            stateLCCount
            ccssLCCount
          }
        }
      }
    }
  }
  ```

  ```cypher Cypher theme={null}
  MATCH (state:StandardsFrameworkItem)-[r:hasStandardAlignment]->(ccss:StandardsFrameworkItem)
  WHERE state.jurisdiction = 'Texas' AND state.academicSubject = 'Mathematics'
  RETURN
    state.jurisdiction AS state_jurisdiction,
    state.statementCode AS state_standard_code,
    state.gradeLevel AS state_grade_level,
    state.description AS state_description,
    state.academicSubject AS state_academic_subject,
    ccss.statementCode AS ccss_standard_code,
    ccss.gradeLevel AS ccss_grade_level,
    ccss.description AS ccss_description,
    ccss.academicSubject AS ccss_academic_subject,
    r.jaccard,
    r.sharedLCCount,
    r.stateLCCount,
    r.ccssLCCount
  ORDER BY state.statementCode, ccss.statementCode, r.jaccard DESC
  ```
</CodeGroup>

### Filter crosswalks by similarity threshold

Return all Texas crosswalks with Jaccard score of 0.7 or higher.

<CodeGroup>
  ```graphql GraphQL theme={null}
  {
    standardsFrameworkItems(
      where: {
        jurisdiction: "Texas"
        hasStandardAlignmentStandardsFrameworkItemsConnection_SOME: {
          edge: { jaccard_GTE: 0.7 }
        }
      }
    ) {
      jurisdiction
      statementCode
      hasStandardAlignmentStandardsFrameworkItemsConnection(
        where: { edge: { jaccard_GTE: 0.7 } }
      ) {
        edges {
          node {
            statementCode
          }
          properties {
            jaccard
            sharedLCCount
            stateLCCount
            ccssLCCount
          }
        }
      }
    }
  }
  ```

  ```cypher Cypher theme={null}
  MATCH (state:StandardsFrameworkItem)-[r:hasStandardAlignment]->(ccss:StandardsFrameworkItem)
  WHERE r.jaccard >= 0.7 AND state.jurisdiction = 'Texas'
  RETURN
    state.jurisdiction AS state_jurisdiction,
    state.statementCode AS state_standard_code,
    ccss.statementCode AS ccss_standard_code,
    r.jaccard,
    r.sharedLCCount,
    r.stateLCCount,
    r.ccssLCCount
  ORDER BY ccss.statementCode, r.jaccard DESC
  ```
</CodeGroup>

### Find the best state match for a CCSS standard

Return the top Texas standards that best match CCSS standard '6.EE.B.5' with full metadata.

<CodeGroup>
  ```graphql GraphQL theme={null}
  {
    standardsFrameworkItems(
      where: {
        statementCode: "6.EE.B.5"
        jurisdiction: "Multi-State"
      }
    ) {
      statementCode
      description
      gradeLevel
      jurisdiction
      academicSubject
      standardsFrameworkItemshasStandardAlignmentConnection(
        where: { node: { jurisdiction: "Texas" } }
      ) {
        edges {
          node {
            statementCode
            description
            gradeLevel
            jurisdiction
            academicSubject
          }
          properties {
            jaccard
            sharedLCCount
            stateLCCount
            ccssLCCount
          }
        }
      }
    }
  }
  ```

  ```cypher Cypher theme={null}
  MATCH (state:StandardsFrameworkItem)-[r:hasStandardAlignment]->(ccss:StandardsFrameworkItem)
  WHERE ccss.statementCode = '6.EE.B.5'
    AND ccss.jurisdiction = 'Multi-State'
    AND state.jurisdiction = 'Texas'
  RETURN
    ccss.statementCode AS ccss_standard_code,
    ccss.description AS ccss_description,
    ccss.gradeLevel AS ccss_grade_level,
    ccss.jurisdiction AS ccss_jurisdiction,
    ccss.academicSubject AS ccss_academic_subject,
    state.statementCode AS state_standard_code,
    state.description AS state_description,
    state.gradeLevel AS state_grade_level,
    state.jurisdiction AS state_jurisdiction,
    state.academicSubject AS state_academic_subject,
    r.jaccard,
    r.sharedLCCount,
    r.stateLCCount,
    r.ccssLCCount
  ORDER BY r.jaccard DESC
  LIMIT 10
  ```
</CodeGroup>

## Learner variability navigator (LVN) queries

### List all learner models

Return all learner models available in the Knowledge Graph.

<CodeGroup>
  ```graphql GraphQL theme={null}
  {
    learnerModels {
      identifier
      name
      description
      academicSubject
      gradeLevel
    }
  }
  ```

  ```cypher Cypher theme={null}
  MATCH (lm:LearnerModel)
  RETURN
    lm.identifier,
    lm.name,
    lm.description,
    lm.academicSubject,
    lm.gradeLevel
  ```
</CodeGroup>

### Get factors for a learner model

Return all factors associated with the 'Portrait of a Learner 4-8' learner model.

<CodeGroup>
  ```graphql GraphQL theme={null}
  {
    learnerModels(where: { name: "Portrait of a Learner 4-8" }) {
      name
      identifier
      description
      hasFactorFactors {
        identifier
        name
        description
        category
        gradeLevel
      }
    }
  }
  ```

  ```cypher Cypher theme={null}
  MATCH (lm:LearnerModel {name: 'Portrait of a Learner 4-8'})-[:hasFactor]->(f:Factor)
  RETURN
    lm.name AS learner_model_name,
    lm.identifier AS learner_model_id,
    f.identifier AS factor_id,
    f.name AS factor_name,
    f.description AS factor_description,
    f.category AS factor_category,
    f.gradeLevel AS factor_grade_level
  ```
</CodeGroup>

### Get strategies for a learner model

Return all strategies associated with the 'Portrait of a Learner 4-8' learner model.

<CodeGroup>
  ```graphql GraphQL theme={null}
  {
    learnerModels(where: { name: "Portrait of a Learner 4-8" }) {
      name
      identifier
      description
      hasStrategyStrategies {
        identifier
        name
        description
        category
        gradeLevel
      }
    }
  }
  ```

  ```cypher Cypher theme={null}
  MATCH (lm:LearnerModel {name: 'Portrait of a Learner 4-8'})-[:hasStrategy]->(s:Strategy)
  RETURN
    lm.name AS learner_model_name,
    lm.identifier AS learner_model_id,
    s.identifier AS strategy_id,
    s.name AS strategy_name,
    s.description AS strategy_description,
    s.category AS strategy_category,
    s.gradeLevel AS strategy_grade_level
  ```
</CodeGroup>

### Get factors that interact with a specific factor

Return all factors that interact with 'Working Memory' factor from Building Math 3-6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  {
    factors(where: { identifier: "9501e48b-c985-501f-84ad-98c3f271e322" }) {
      name
      identifier
      description
      category
      gradeLevel
      academicSubject
      interactsWithFactorFactors {
        identifier
        name
        description
        category
        gradeLevel
      }
    }
  }
  ```

  ```cypher Cypher theme={null}
  MATCH (f:Factor {identifier: '9501e48b-c985-501f-84ad-98c3f271e322'})-[:interactsWithFactor]->(related:Factor)
  RETURN
    f.name AS factor_name,
    f.identifier AS factor_id,
    f.gradeLevel AS grade_level,
    f.academicSubject AS academic_subject,
    related.identifier AS related_factor_id,
    related.name AS related_factor_name,
    related.description AS related_factor_description,
    related.category AS related_factor_category,
    related.gradeLevel AS related_factor_grade_level
  ```
</CodeGroup>

### View all strategies that target a specific factor

Return all strategies that target 'Working Memory' factor from Building Math 3-6.

<CodeGroup>
  ```graphql GraphQL theme={null}
  {
    factors(where: { identifier: "9501e48b-c985-501f-84ad-98c3f271e322" }) {
      name
      identifier
      category
      gradeLevel
      academicSubject
      strategiestargetsFactorConnection {
        edges {
          node {
            name
            category
          }
          properties {
            connectionType
            factorCategory
          }
        }
      }
    }
  }
  ```

  ```cypher Cypher theme={null}
  MATCH (s:Strategy)-[r:targetsFactor]->(f:Factor {identifier: '9501e48b-c985-501f-84ad-98c3f271e322'})
  RETURN
    f.name AS factor_name,
    f.gradeLevel AS grade_level,
    f.academicSubject AS academic_subject,
    s.name AS strategy,
    s.category AS strategy_category,
    r.connectionType AS connection,
    r.factorCategory AS factor_category
  ORDER BY s.name
  ```
</CodeGroup>

### View all standards relevant to a specific factor

Return all standards that are relevant to 'Algebraic Thinking' factor.

<CodeGroup>
  ```graphql GraphQL theme={null}
  {
    factors(where: { name: "Algebraic Thinking" }) {
      name
      identifier
      category
      relevantToStandardStandardsFrameworkItems {
        statementCode
        description
        gradeLevel
        jurisdiction
        academicSubject
      }
    }
  }
  ```

  ```cypher Cypher theme={null}
  MATCH (f:Factor {name: 'Algebraic Thinking'})-[:relevantToStandard]->(s:StandardsFrameworkItem)
  RETURN
    f.name AS factor_name,
    f.identifier AS factor_id,
    s.statementCode AS standard_code,
    s.description AS standard_description,
    s.gradeLevel AS grade_level,
    s.jurisdiction AS jurisdiction,
    s.academicSubject AS academic_subject
  ORDER BY s.statementCode
  ```
</CodeGroup>
