graphql-mesh icon indicating copy to clipboard operation
graphql-mesh copied to clipboard

GraphQL Mesh not correctly mapping FHIR data

Open colmbrady opened this issue 7 months ago • 2 comments

Issue workflow progress

Progress of the issue based on the Contributor Workflow

  • [x] 1. The issue provides a reproduction available on CodeDamn

(Needed Node 18 to run)

Make sure to fork this template and run yarn generate in the terminal.

Please make sure Mesh package versions under package.json matches yours.

  • [ ] 2. A failing test has been provided
  • [ ] 3. A local solution has been provided
  • [ ] 4. A pull request is pending review

Describe the bug

I am experimenting with the FHIR Graphql example from this repo.

It appears that when I try to Query some FHIR resources, the GQL Payload has some of the data, but not all of it. I don't know why this is.

To Reproduce Steps to reproduce the behavior:

https://codedamn.com/playground/Bcj3ufM47fQhayyXjbTU1

I have got a codedamn environment which I can reproduce the problem with. To use it, you need to run:

npm i
npm run start

Then click on the browser tab at bottom right of screen to open internal browser.

Paste in this Query:

query MyQuery {
  resourceByName(name: "hart", resourceType: "Practitioner") {
    id
    entry {
      resource {
        ... on Practitioner {
          id
          name {
            family
            given
            id
          }
        }
      }
    }
  }
}

See screen shot below with data missing from the API response.

Screenshot 2023-12-05 at 12 21 36 PM

Here is the JSON FHIR Response:

{
    "resourceType": "Bundle",
    "id": "10396905-772f-4483-9f76-a283da72317e",
    "meta": {
        "lastUpdated": "2023-12-04T20:32:44.660+00:00"
    },
    "type": "searchset",
    "link": [
        {
            "relation": "self",
            "url": "https://hapi.fhir.org/baseR4/Practitioner?_format=application%2Fjson&name=hart"
        },
        {
            "relation": "next",
            "url": "https://hapi.fhir.org/baseR4?_getpages=10396905-772f-4483-9f76-a283da72317e&_getpagesoffset=20&_count=20&_format=application%2Fjson&_pretty=true&_bundletype=searchset"
        }
    ],
    "entry": [
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1193442",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1193442",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2020-06-09T14:17:48.115+00:00",
                    "source": "#dfcntu7N8izkLHzp"
                },
                "identifier": [
                    {
                        "type": {
                            "coding": [
                                {
                                    "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                                    "code": "MD",
                                    "display": "Medical License number"
                                }
                            ],
                            "text": "Medical License number"
                        },
                        "value": "374678285"
                    },
                    {
                        "type": {
                            "coding": [
                                {
                                    "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                                    "code": "PRN",
                                    "display": "Provider number"
                                }
                            ],
                            "text": "Provider number"
                        },
                        "value": "2364738776"
                    }
                ],
                "name": [
                    {
                        "family": "Phil",
                        "given": [
                            "Hart"
                        ]
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1193448",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1193448",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2020-06-09T14:17:52.264+00:00",
                    "source": "#vE5mFmgaEMB9PflB"
                },
                "identifier": [
                    {
                        "type": {
                            "coding": [
                                {
                                    "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                                    "code": "MD",
                                    "display": "Medical License number"
                                }
                            ],
                            "text": "Medical License number"
                        },
                        "value": "374678291"
                    },
                    {
                        "type": {
                            "coding": [
                                {
                                    "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                                    "code": "PRN",
                                    "display": "Provider number"
                                }
                            ],
                            "text": "Provider number"
                        },
                        "value": "2364738782"
                    }
                ],
                "name": [
                    {
                        "family": "Sonia",
                        "given": [
                            "Hart"
                        ]
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1193467",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1193467",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2020-06-09T14:18:05.395+00:00",
                    "source": "#vv3BDSmTfIdiNG5j"
                },
                "identifier": [
                    {
                        "type": {
                            "coding": [
                                {
                                    "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                                    "code": "MD",
                                    "display": "Medical License number"
                                }
                            ],
                            "text": "Medical License number"
                        },
                        "value": "374678310"
                    },
                    {
                        "type": {
                            "coding": [
                                {
                                    "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                                    "code": "PRN",
                                    "display": "Provider number"
                                }
                            ],
                            "text": "Provider number"
                        },
                        "value": "2364738801"
                    }
                ],
                "name": [
                    {
                        "family": "Rachel",
                        "given": [
                            "Hart"
                        ]
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1193598",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1193598",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2020-06-09T14:19:49.889+00:00",
                    "source": "#h5WjXoRHt5QLtEaJ"
                },
                "identifier": [
                    {
                        "type": {
                            "coding": [
                                {
                                    "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                                    "code": "MD",
                                    "display": "Medical License number"
                                }
                            ],
                            "text": "Medical License number"
                        },
                        "value": "374678441"
                    },
                    {
                        "type": {
                            "coding": [
                                {
                                    "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                                    "code": "PRN",
                                    "display": "Provider number"
                                }
                            ],
                            "text": "Provider number"
                        },
                        "value": "2364738932"
                    }
                ],
                "name": [
                    {
                        "family": "Julian",
                        "given": [
                            "Hart"
                        ]
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/2437758",
            "resource": {
                "resourceType": "Practitioner",
                "id": "2437758",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2021-07-21T11:23:06.083+00:00",
                    "source": "#BkLAeH8vl9ZN33qN"
                },
                "active": true,
                "name": [
                    {
                        "family": "Hect",
                        "given": [
                            "Hector",
                            "Hart"
                        ],
                        "prefix": [
                            "Dr"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "(03) 3410 8956",
                        "use": "mobile",
                        "rank": 2
                    }
                ],
                "address": [
                    {
                        "use": "home",
                        "type": "both",
                        "text": "4524 Preston Street, Scottsdale, Arizona  85256",
                        "line": [
                            "4524 Preston Street"
                        ],
                        "city": "Scottsdale",
                        "state": "Arizona",
                        "postalCode": "85256"
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1965008",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1965008",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2021-03-24T11:03:09.400+00:00",
                    "source": "#NtpXRbCUQsjHmKL5"
                },
                "identifier": [
                    {
                        "system": "urn:oid:2.16.840.1.113883.4.6",
                        "value": "1811008840"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.3.1301.1.83",
                        "value": "0006"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Hartman MD",
                        "given": [
                            "Jennifer"
                        ],
                        "suffix": [
                            "Jennifer"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455"
                    },
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455",
                        "use": "work"
                    }
                ],
                "address": [
                    {
                        "line": [
                            "1160 West Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "43222"
                    },
                    {
                        "text": "Lower Lights Christian Health Ctr - Test",
                        "line": [
                            "1160 W Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "432221359",
                        "country": "US"
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1965210",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1965210",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2021-03-24T11:03:09.400+00:00",
                    "source": "#NtpXRbCUQsjHmKL5"
                },
                "identifier": [
                    {
                        "system": "urn:oid:2.16.840.1.113883.4.6",
                        "value": "1811008840"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.3.1301.1.83",
                        "value": "0006"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Hartman MD",
                        "given": [
                            "Jennifer"
                        ],
                        "suffix": [
                            "Jennifer"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455"
                    },
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455",
                        "use": "work"
                    }
                ],
                "address": [
                    {
                        "line": [
                            "1160 West Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "43222"
                    },
                    {
                        "text": "Lower Lights Christian Health Ctr - Test",
                        "line": [
                            "1160 W Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "432221359",
                        "country": "US"
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1965424",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1965424",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2021-03-24T11:06:11.598+00:00",
                    "source": "#eVgcdDUjbaWl3Gzt"
                },
                "identifier": [
                    {
                        "system": "urn:oid:2.16.840.1.113883.4.6",
                        "value": "1811008840"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.3.1301.1.83",
                        "value": "0006"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Hartman MD",
                        "given": [
                            "Jennifer"
                        ],
                        "suffix": [
                            "Jennifer"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455"
                    },
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455",
                        "use": "work"
                    }
                ],
                "address": [
                    {
                        "line": [
                            "1160 West Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "43222"
                    },
                    {
                        "text": "Lower Lights Christian Health Ctr - Test",
                        "line": [
                            "1160 W Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "432221359",
                        "country": "US"
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1965626",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1965626",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2021-03-24T11:06:11.598+00:00",
                    "source": "#eVgcdDUjbaWl3Gzt"
                },
                "identifier": [
                    {
                        "system": "urn:oid:2.16.840.1.113883.4.6",
                        "value": "1811008840"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.3.1301.1.83",
                        "value": "0006"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Hartman MD",
                        "given": [
                            "Jennifer"
                        ],
                        "suffix": [
                            "Jennifer"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455"
                    },
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455",
                        "use": "work"
                    }
                ],
                "address": [
                    {
                        "line": [
                            "1160 West Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "43222"
                    },
                    {
                        "text": "Lower Lights Christian Health Ctr - Test",
                        "line": [
                            "1160 W Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "432221359",
                        "country": "US"
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1965840",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1965840",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2021-03-24T11:11:42.910+00:00",
                    "source": "#YjY8DtxwmV4i236e"
                },
                "identifier": [
                    {
                        "system": "urn:oid:2.16.840.1.113883.4.6",
                        "value": "1811008840"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.3.1301.1.83",
                        "value": "0006"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Hartman MD",
                        "given": [
                            "Jennifer"
                        ],
                        "suffix": [
                            "Jennifer"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455"
                    },
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455",
                        "use": "work"
                    }
                ],
                "address": [
                    {
                        "line": [
                            "1160 West Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "43222"
                    },
                    {
                        "text": "Lower Lights Christian Health Ctr - Test",
                        "line": [
                            "1160 W Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "432221359",
                        "country": "US"
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1966042",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1966042",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2021-03-24T11:11:42.910+00:00",
                    "source": "#YjY8DtxwmV4i236e"
                },
                "identifier": [
                    {
                        "system": "urn:oid:2.16.840.1.113883.4.6",
                        "value": "1811008840"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.3.1301.1.83",
                        "value": "0006"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Hartman MD",
                        "given": [
                            "Jennifer"
                        ],
                        "suffix": [
                            "Jennifer"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455"
                    },
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455",
                        "use": "work"
                    }
                ],
                "address": [
                    {
                        "line": [
                            "1160 West Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "43222"
                    },
                    {
                        "text": "Lower Lights Christian Health Ctr - Test",
                        "line": [
                            "1160 W Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "432221359",
                        "country": "US"
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1966233",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1966233",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2021-03-24T11:24:02.578+00:00",
                    "source": "#Y6CTIWLr0fa3dezJ"
                },
                "identifier": [
                    {
                        "system": "urn:oid:2.16.840.1.113883.4.6",
                        "value": "1811008840"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.3.1301.1.83",
                        "value": "0006"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Hartman MD",
                        "given": [
                            "Jennifer"
                        ],
                        "suffix": [
                            "Jennifer"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455"
                    },
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455",
                        "use": "work"
                    }
                ],
                "address": [
                    {
                        "line": [
                            "1160 West Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "43222"
                    },
                    {
                        "text": "Lower Lights Christian Health Ctr - Test",
                        "line": [
                            "1160 W Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "432221359",
                        "country": "US"
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1966435",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1966435",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2021-03-24T11:24:02.578+00:00",
                    "source": "#Y6CTIWLr0fa3dezJ"
                },
                "identifier": [
                    {
                        "system": "urn:oid:2.16.840.1.113883.4.6",
                        "value": "1811008840"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.3.1301.1.83",
                        "value": "0006"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Hartman MD",
                        "given": [
                            "Jennifer"
                        ],
                        "suffix": [
                            "Jennifer"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455"
                    },
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455",
                        "use": "work"
                    }
                ],
                "address": [
                    {
                        "line": [
                            "1160 West Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "43222"
                    },
                    {
                        "text": "Lower Lights Christian Health Ctr - Test",
                        "line": [
                            "1160 W Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "432221359",
                        "country": "US"
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1966735",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1966735",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2021-03-24T14:33:34.409+00:00",
                    "source": "#927iCHNBYCQsxGwN"
                },
                "identifier": [
                    {
                        "system": "urn:oid:2.16.840.1.113883.4.6",
                        "value": "1811008840"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.3.1301.1.83",
                        "value": "0006"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Hartman MD",
                        "given": [
                            "Jennifer"
                        ],
                        "suffix": [
                            "Jennifer"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455"
                    },
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455",
                        "use": "work"
                    }
                ],
                "address": [
                    {
                        "line": [
                            "1160 West Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "43222"
                    },
                    {
                        "text": "Lower Lights Christian Health Ctr - Test",
                        "line": [
                            "1160 W Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "432221359",
                        "country": "US"
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1966937",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1966937",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2021-03-24T14:33:34.409+00:00",
                    "source": "#927iCHNBYCQsxGwN"
                },
                "identifier": [
                    {
                        "system": "urn:oid:2.16.840.1.113883.4.6",
                        "value": "1811008840"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.3.1301.1.83",
                        "value": "0006"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Hartman MD",
                        "given": [
                            "Jennifer"
                        ],
                        "suffix": [
                            "Jennifer"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455"
                    },
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455",
                        "use": "work"
                    }
                ],
                "address": [
                    {
                        "line": [
                            "1160 West Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "43222"
                    },
                    {
                        "text": "Lower Lights Christian Health Ctr - Test",
                        "line": [
                            "1160 W Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "432221359",
                        "country": "US"
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1967191",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1967191",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2021-03-24T15:00:24.132+00:00",
                    "source": "#QsrmuOb1N7Tswliy"
                },
                "identifier": [
                    {
                        "system": "urn:oid:2.16.840.1.113883.4.6",
                        "value": "1811008840"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.3.1301.1.83",
                        "value": "0006"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Hartman MD",
                        "given": [
                            "Jennifer"
                        ],
                        "suffix": [
                            "Jennifer"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455"
                    },
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455",
                        "use": "work"
                    }
                ],
                "address": [
                    {
                        "line": [
                            "1160 West Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "43222"
                    },
                    {
                        "text": "Lower Lights Christian Health Ctr - Test",
                        "line": [
                            "1160 W Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "432221359",
                        "country": "US"
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1967393",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1967393",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2021-03-24T15:00:24.132+00:00",
                    "source": "#QsrmuOb1N7Tswliy"
                },
                "identifier": [
                    {
                        "system": "urn:oid:2.16.840.1.113883.4.6",
                        "value": "1811008840"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.3.1301.1.83",
                        "value": "0006"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Hartman MD",
                        "given": [
                            "Jennifer"
                        ],
                        "suffix": [
                            "Jennifer"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455"
                    },
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455",
                        "use": "work"
                    }
                ],
                "address": [
                    {
                        "line": [
                            "1160 West Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "43222"
                    },
                    {
                        "text": "Lower Lights Christian Health Ctr - Test",
                        "line": [
                            "1160 W Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "432221359",
                        "country": "US"
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1995885",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1995885",
                "meta": {
                    "versionId": "2",
                    "lastUpdated": "2021-05-11T09:08:00.850+00:00",
                    "source": "#S9BVQwbJ0mKM3LtG"
                },
                "identifier": [
                    {
                        "system": "https://kpininja.com/identifier",
                        "value": "b72d7dee-74e5-43a7-9ac9-11def39223fd"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.4.6",
                        "value": "1811008840"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.3.1301.1.83",
                        "value": "0006"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Hartman MD",
                        "given": [
                            "Jennifer"
                        ],
                        "suffix": [
                            "Jennifer"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455"
                    },
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455",
                        "use": "work"
                    }
                ],
                "address": [
                    {
                        "use": "home",
                        "line": [
                            "1160 West Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "43222"
                    },
                    {
                        "text": "Lower Lights Christian Health Ctr - Test",
                        "line": [
                            "1160 W Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "432221359",
                        "country": "US"
                    }
                ],
                "qualification": [
                    {
                        "code": {
                            "coding": [
                                {
                                    "system": "urn:oid:"
                                }
                            ]
                        }
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1996087",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1996087",
                "meta": {
                    "versionId": "2",
                    "lastUpdated": "2021-05-11T09:08:00.850+00:00",
                    "source": "#S9BVQwbJ0mKM3LtG"
                },
                "identifier": [
                    {
                        "system": "https://kpininja.com/identifier",
                        "value": "0dfb69e1-faca-4f24-a2e0-7d245afba9b7"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.4.6",
                        "value": "1811008840"
                    },
                    {
                        "system": "urn:oid:2.16.840.1.113883.3.1301.1.83",
                        "value": "0006"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Hartman MD",
                        "given": [
                            "Jennifer"
                        ],
                        "suffix": [
                            "Jennifer"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455"
                    },
                    {
                        "system": "phone",
                        "value": "tel:+1-6142741455",
                        "use": "work"
                    }
                ],
                "address": [
                    {
                        "use": "home",
                        "line": [
                            "1160 West Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "43222"
                    },
                    {
                        "text": "Lower Lights Christian Health Ctr - Test",
                        "line": [
                            "1160 W Broad Street "
                        ],
                        "city": "Columbus",
                        "state": "OH",
                        "postalCode": "432221359",
                        "country": "US"
                    }
                ],
                "qualification": [
                    {
                        "code": {
                            "coding": [
                                {
                                    "system": "urn:oid:"
                                }
                            ]
                        }
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        },
        {
            "fullUrl": "https://hapi.fhir.org/baseR4/Practitioner/1406748",
            "resource": {
                "resourceType": "Practitioner",
                "id": "1406748",
                "meta": {
                    "versionId": "1",
                    "lastUpdated": "2020-07-16T07:37:24.634+00:00",
                    "source": "#fAdRhMQc7nmwC5cf",
                    "profile": [
                        "http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/plannet-Practitioner"
                    ]
                },
                "identifier": [
                    {
                        "use": "official",
                        "type": {
                            "coding": [
                                {
                                    "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                                    "code": "PRN",
                                    "display": "Provider number",
                                    "userSelected": true
                                }
                            ],
                            "text": "NPI"
                        },
                        "system": "http://hl7.org/fhir/sid/us-npi",
                        "value": "1232602223",
                        "assigner": {
                            "display": "CMS"
                        }
                    }
                ],
                "active": true,
                "name": [
                    {
                        "use": "official",
                        "family": "Hartmann",
                        "given": [
                            "Dortha",
                            "Cathie"
                        ],
                        "suffix": [
                            "CNM"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "1-358-312-2756",
                        "use": "work"
                    },
                    {
                        "system": "fax",
                        "value": "(157) 303-8255",
                        "use": "work"
                    }
                ],
                "address": [
                    {
                        "extension": [
                            {
                                "url": "http://hl7.org/fhir/StructureDefinition/geolocation",
                                "extension": [
                                    {
                                        "url": "latitude",
                                        "valueDecimal": 42.0846
                                    },
                                    {
                                        "url": "longitude",
                                        "valueDecimal": -71.01986
                                    }
                                ]
                            }
                        ],
                        "use": "work",
                        "type": "both",
                        "text": "63 MAIN ST, BROCKTON, MA 023014042",
                        "line": [
                            "63 MAIN ST"
                        ],
                        "city": "BROCKTON",
                        "state": "MA",
                        "postalCode": "023014042",
                        "country": "USA"
                    }
                ],
                "gender": "female",
                "qualification": [
                    {
                        "extension": [
                            {
                                "url": "http://hl7.org/fhir/uv/vhdir/StructureDefinition/practitioner-qualification",
                                "extension": [
                                    {
                                        "url": "status",
                                        "valueCoding": {
                                            "system": "http://hl7.org/fhir/resource-status",
                                            "code": "active",
                                            "display": "active"
                                        }
                                    },
                                    {
                                        "url": "whereValid",
                                        "valueCodeableConcept": {
                                            "coding": [
                                                {
                                                    "system": "https://www.usps.com",
                                                    "code": "MA",
                                                    "display": "Massachusetts",
                                                    "userSelected": true
                                                }
                                            ],
                                            "text": "Massachusetts"
                                        }
                                    }
                                ]
                            }
                        ],
                        "identifier": [
                            {
                                "use": "official",
                                "type": {
                                    "coding": [
                                        {
                                            "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                                            "code": "MD",
                                            "display": "Medical License Number"
                                        }
                                    ],
                                    "text": "Medical License Number"
                                },
                                "system": "https://www.mass.gov/orgs",
                                "value": "199308",
                                "assigner": {
                                    "display": "Board of Registration in Medicine (BORIM)"
                                }
                            }
                        ],
                        "code": {
                            "coding": [
                                {
                                    "system": "http://nucc.org/provider-taxonomy",
                                    "code": "367A00000X",
                                    "display": "Advanced Practice Midwife"
                                }
                            ],
                            "text": "Advanced Practice Midwife"
                        },
                        "period": {
                            "start": "2019-10-17",
                            "end": "2022-10-17"
                        },
                        "issuer": {
                            "display": "Board of Registration in Medicine (BORIM)"
                        }
                    }
                ],
                "communication": [
                    {
                        "extension": [
                            {
                                "url": "http://hl7.org/fhir/uv/vhdir/StructureDefinition/communication-proficiency",
                                "valueCodeableConcept": {
                                    "coding": [
                                        {
                                            "system": "http://hl7.org/fhir/uv/vhdir/CodeSystem/languageproficiency",
                                            "code": "50",
                                            "display": "Functional native proficiency"
                                        }
                                    ],
                                    "text": "Functional native proficiency"
                                }
                            }
                        ],
                        "coding": [
                            {
                                "system": "urn:ietf:bcp:47",
                                "code": "en",
                                "display": "English"
                            }
                        ],
                        "text": "English"
                    },
                    {
                        "extension": [
                            {
                                "url": "http://hl7.org/fhir/uv/vhdir/StructureDefinition/communication-proficiency",
                                "valueCodeableConcept": {
                                    "coding": [
                                        {
                                            "system": "http://hl7.org/fhir/uv/vhdir/CodeSystem/languageproficiency",
                                            "code": "40",
                                            "display": "Advanced professional proficiency"
                                        }
                                    ],
                                    "text": "Advanced professional proficiency"
                                }
                            }
                        ],
                        "coding": [
                            {
                                "system": "urn:ietf:bcp:47",
                                "code": "vi",
                                "display": "Vietnamese"
                            }
                        ],
                        "text": "Vietnamese"
                    }
                ]
            },
            "search": {
                "mode": "match"
            }
        }
    ]
}

Here is the Mesh Response:

🐛 🕸️  Mesh - FHIR - Query.resourceByName Returning  {
  resourceType: 'Bundle',
  id: '012301aa-c817-4301-8f5d-efcefee4146d',
  meta: { lastUpdated: '2023-12-04T23:20:55.798+00:00' },
  type: 'searchset',
  link: [
    {
      relation: 'self',
      url: 'https://hapi.fhir.org/baseR4/Practitioner?_format=application%2Fjson&name=hart'
    },
    {
      relation: 'next',
      url: 'https://hapi.fhir.org/baseR4?_getpages=012301aa-c817-4301-8f5d-efcefee4146d&_getpagesoffset=20&_count=20&_format=application%2Fjson&_pretty=true&_bundletype=searchset'
    }
  ],
  entry: [
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1193442',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1193448',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1193467',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1193598',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/2437758',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1965008',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1965210',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1965424',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1965626',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1965840',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1966042',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1966233',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1966435',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1966735',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1966937',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1967191',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1967393',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1995885',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1996087',
      resource: [Object],
      search: [Object]
    },
    {
      fullUrl: 'https://hapi.fhir.org/baseR4/Practitioner/1406748',
      resource: [Object],
      search: [Object]
    }
  ]
}

Expected behavior

The Resources that are Missing in the Screen Shot should be populated.

Environment:

  • OS: All
  • @graphql-mesh/json-schema: ^0.97.0
  • @graphql-mesh/cli: ^0.88.0
  • NodeJS: 18

Additional context

colmbrady avatar Dec 04 '23 23:12 colmbrady

Mesh configuration file is empty in the sandbox you shared as I see. Let me know if I am missing something! Thanks for the issue!

ardatan avatar Dec 05 '23 05:12 ardatan

I think it takes a couple of seconds to load after you open the file.

This is the content that I see:

sources:
  - name: FHIR
    handler:
      jsonSchema:
        operationHeaders:
          Authorization: '{context.headers[authorization]}'
        endpoint: https://hapi.fhir.org/baseR4/
        #endpoint: http://localhost:8080/fhir/4.0/
        operations:
          - type: Query
            field: resourceById
            method: GET
            path: /{args.resourceType}/{args.id}?_format=application/json
            responseSchema: ./fhir.schema.json#/definitions/ResourceList
          - type: Query
            field: resourceByName
            method: GET
            path: /{args.resourceType}/?name={args.name}?_format=application/json
            responseSchema: ./fhir.schema.json#/definitions/Bundle
          - type: Query
            field: resourceByOtherResourceId
            method: GET
            path: /{args.resourceType}?subject={args.otherResourceType}/{args.otherResourceId}
            responseSchema: ./fhir.schema.json#/definitions/Bundle

additionalTypeDefs: |
  extend type Reference {
    resource: ResourceList @resolveTo(
      sourceName: "FHIR",
      sourceTypeName: "Query",
      sourceFieldName: "resourceById",
      sourceArgs: {
        resourceType: "{root.reference}"
      }
    ),
  }

I had to use this sandbox as it supports Node 18. Im not sure the others you recommend on the issue template do.

To run the example, in the terminal, run npm i && npm run start and then open the browser and it hopefully works.. :)

Thanks for reviewing the issue so quickly.

colmbrady avatar Dec 05 '23 08:12 colmbrady