FHIR Chat · GraphQL usage · hapi

Stream: hapi

Topic: GraphQL usage


view this post on Zulip Dexter (Feb 18 2021 at 05:39):

I'm trying to use GraphQL on the public server, to see if I can simplify some of my queries and the parsing logic in my apps

I couldn't make an analogous GraphQL query to the standard REST query

  • Get all patients (/Patient)
  • Get patients by identifier (/Patient?indetifier=CODE|)

view this post on Zulip Dexter (Feb 18 2021 at 05:41):

This works, given an ID

https://hapi.fhir.org/baseR4/Patient/ID/$graphql

query {
    id
    identifier {
        system
        value
    }
    name {
        given
    }
}

view this post on Zulip Venu Gopal (Feb 18 2021 at 06:06):

you need to use PatientList and ...on entry like below :

query{
PatientList{
entry{
resource{
...on Patient{
name{
family
given
}
}
}
}
}
}

I use the asymmetrik server so my endpoint is something like : https://baseURL/4_0_0/$graphql

view this post on Zulip Dexter (Feb 18 2021 at 06:08):

On https://hapi.fhir.org/baseR4/$graphql, I get an error
Says Unable to execute GraphQL Expression: null

view this post on Zulip dsh (Apr 08 2021 at 20:36):

@Dexter was that a POST request ? and were you able to successfully execute GrphQL queries ?


Last updated: Apr 12 2022 at 19:14 UTC