FHIR Chat · How to handle null fields? · graphql

Stream: graphql

Topic: How to handle null fields?


view this post on Zulip Jorn van de Beek (Sep 16 2020 at 13:36):

The fhir json page mentions fields that are null should be not provided at all as an attribute, yet this does not fit the grapqhl practice where a queried field is always present as an attribute in the json response. Am i correct in this? What is the best practice here, assume the receiving system will accept nulls in attributes or postprocess the grapql response to take out the attributes with nulls completely?

I am leaning towards the latter (remove null attributes from the json) because the json will not validate as fhir otherwise, and this simplifies passing on the messages to other systems, but this seems an unforunate extra step.

view this post on Zulip Grahame Grieve (Sep 16 2020 at 20:00):

the json will not validate as fhir otherwise

graphql output is not FHIR resources


Last updated: Apr 12 2022 at 19:14 UTC