Stream: hapi
Topic: GraphQL
dsh (May 08 2020 at 18:41):
Is there a way to fetch GraphQL schema supported by 4.1 ? or do some kind of introspection to know what in graphql is supported or not ?
dsh (May 09 2020 at 04:05):
@Lloyd McKenzie any info on this ^
James Agnew (May 09 2020 at 17:48):
Nothing like this exists in HAPI yet- It does sound like something that would be useful though
dsh (May 09 2020 at 19:50):
Thanks @James Agnew in absence of a GraphQL schema are there any HAPI implementation specific documentation that can help? Moreover do u think HAPI is GraphQL ready?
James Agnew (May 09 2020 at 19:56):
This probably depends on your definition of "ready". GraphQL was only
really added to the server fairly recently, and I don't have a sense that
it has been widely adopted or tested yet. So from the perspective of "how
battle tested is it", I guess the answer is not very.
That said, I do believe the code is solid for the use cases it currently
covers. It still needs lots of work though to further enhance it (POST
support, paging support for searches, etc.)
Grahame Grieve (May 09 2020 at 21:13):
I have very little interest in supporting mutations - it seems to me that it only supports mutations because of the hammer/nail thing - it doesn't do anything useful. OTOH, i though I had done schema support.
James Agnew (May 09 2020 at 21:42):
FWIW by POST support I just mean that there is no way in HAPI server right now to submit a GraphQL read query via a POST instead of on the GET URL, which I have heard complaints makes it kind of cumbersome.
Grahame Grieve (May 09 2020 at 22:27):
ah ok. yes that is a necessary feature
dsh (May 10 2020 at 14:32):
Grahame Grieve said:
I have very little interest in supporting mutations - it seems to me that it only supports mutations because of the hammer/nail thing - it doesn't do anything useful. OTOH, i though I had done schema support.
@Grahame Grieve that's fantastic
dsh (May 10 2020 at 14:33):
How do you access the graphql schema?
dsh (May 13 2020 at 22:39):
@Grahame Grieve any ideas ^ ?
Grahame Grieve (May 13 2020 at 22:43):
presumably you've tried using the standard graphql introspection request?
dsh (May 14 2020 at 04:02):
@Grahame Grieve no I have not. But I have tried is very basic examples http://build.fhir.org/graphql.html and not knowing what fields and relations are searchable is what I think is the stumbling block.
dsh (May 14 2020 at 04:02):
apart from the fact currently graphql queries cannot be executed using a POST method
Grahame Grieve (May 14 2020 at 04:07):
not knowing what fields and relations are searchable
So that is driven from the definitions in the specification - which is more human readable than the graphql introspection tools generally create. So we've typically thought that graphql schema is primarily for graphql tooling
dsh (May 14 2020 at 04:08):
any pointers/references to graphql introspection tools. And any way to access graphql schema in any shape and form ?
Grahame Grieve (May 14 2020 at 04:12):
the graphql schema are all posted to the hl7.org server, but aren't accessible. I presume this is because the hl7.org server won't serve unknown mime type files . @David Johnson the file extension is .graphql, and the mime type for graphql is application/json. The files aren't linked from anywhere, but exist at [resource].graphql (where resource is lower case). It does work on build.fhir.org: http://build.fhir.org/patient.graphql
dsh (May 14 2020 at 04:17):
@Grahame Grieve That's very helpful indeed.
My biggest reason to even consider GraphQL is to be able to do relational queries so I can pull some data for machine learning models. At a high level apart from REST approach what are some other query interfaces ? GraphQL, CQL ..... ?
dsh (May 14 2020 at 04:19):
I am even considering using https://github.com/Asymmetrik/graphql-fhir to store a a copy the data from HAPI server so that it is easier to do run GraphQL queries .... but I understanding its like grasping at straws
Grahame Grieve (May 14 2020 at 04:19):
well, there's a set of disparate choices that each work differently:
- the restful interface search
- the _filter parameter
- restful api + GraphDefinition
- graphQL
- cql
- bulk data + sql+ of your choice
Grahame Grieve (May 14 2020 at 04:19):
you can mix'n'match between those
David Johnson (May 14 2020 at 12:53):
I've added the mimetype. Is there a known link I can test?
Jose Costa Teixeira (May 14 2020 at 12:55):
http://www.hl7.org/fhir/patient.graphql seems to work (but I am just guessing it from the thread)
David Johnson (May 14 2020 at 12:55):
Thank you!
Last updated: Apr 12 2022 at 19:14 UTC