directive @core(feature: String!) repeatable on SCHEMA directive @join__owner(graph: join__Graph!) on OBJECT directive @join__type( graph: join__Graph! key: String! resolvable: Boolean = true ) repeatable on OBJECT | INTERFACE directive @join__field( graph: join__Graph requires: String provides: String ) on FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE enum join__Graph { COURSES @join__graph(name: "courses", url: "http://example.com/courses") RATINGS @join__graph(name: "ratings", url: "http://example.com/ratings") STUDENTS @join__graph(name: "students", url: "http://example.com/students") } type Course @join__type(graph: COURSES, key: "id") @join__type(graph: STUDENTS, key: "id") { description: String @join__field(graph: COURSES) enrolledStudents: [Student] @join__field(graph: STUDENTS, requires: "id") id: ID! name: String @join__field(graph: COURSES) } type Enrollment @join__type(graph: COURSES, key: "studentId courseId") @join__type(graph: RATINGS, key: "studentId courseId") @join__type(graph: STUDENTS, key: "studentId courseId") { course: Course @join__field(graph: STUDENTS) courseId: ID! enrollmentDate: String @join__field(graph: STUDENTS) enrollmentDetails: Enrollment @join__field(graph: COURSES, requires: "studentId courseId") rating: CourseRating @join__field(graph: RATINGS) studentId: ID! } type CourseRating @join__type(graph: RATINGS, key: "courseId") { comments: String @join__field(graph: RATINGS) courseId: ID! rating: Float @join__field(graph: RATINGS) } type Student @join__type(graph: STUDENTS, key: "id") { enrollments: [Enrollment] @join__field(graph: STUDENTS) id: ID! name: String @join__field(graph: STUDENTS) } type Query { course(id: ID!): Course @join__field(graph: COURSES) courseRating(courseId: ID!): [CourseRating] @join__field(graph: RATINGS) courses: [Course] @join__field(graph: COURSES) student(id: ID!): Student @join__field(graph: STUDENTS) students: [Student] @join__field(graph: STUDENTS) }