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 { PATIENT_INFO @join__graph(name: "patient-info", url: "http://example.com/patient-info") PATIENT_RECORD @join__graph(name: "patient-record", url: "http://example.com/patient-record") } type Patient @join__type(graph: PATIENT_INFO, key: "id") @join__type(graph: PATIENT_RECORD, key: "id") { dateOfBirth: String @join__field(graph: PATIENT_INFO) id: ID! medicalRecords: [PatientRecord] @join__field(graph: PATIENT_RECORD, requires: "id") name: String @join__field(graph: PATIENT_INFO) } type PatientRecord @join__type(graph: PATIENT_INFO, key: "patient { id } recordId") @join__type(graph: PATIENT_RECORD, key: "patient { id } recordId") { admissionDate: String @join__field(graph: PATIENT_INFO) diagnosis: String @join__field(graph: PATIENT_RECORD) extendPatientRecord: PatientRecord @join__field(graph: PATIENT_INFO, requires: "patient { id } recordId") patient: Patient recordId: ID! treatmentPlan: String @join__field(graph: PATIENT_RECORD) } type Query { patient(id: ID!): Patient @join__field(graph: PATIENT_INFO) patientRecord(recordId: ID!, patientId: ID!): PatientRecord @join__field(graph: PATIENT_RECORD) patientRecords: [PatientRecord] @join__field(graph: PATIENT_RECORD) patients: [Patient] @join__field(graph: PATIENT_INFO) }