FHIR Chat · GraphQL support · hapi

Stream: hapi

Topic: GraphQL support


view this post on Zulip Ye Wang (Apr 19 2018 at 20:48):

Is the support for GraphQL ready in HAPI? I found this post https://groups.google.com/forum/#!topic/hapi-fhir/OJm_nQAQuB0. But it seems there's no mentioning of GraphQL at HAPI website. @James Agnew

view this post on Zulip James Agnew (May 20 2018 at 15:45):

GraphQL remains an experimental feature for now, so it doens't get much mention in the documentation. My expectation is that once R4 is balloted we wll firm up this support and document it.

view this post on Zulip Daniel Cheung (Jan 14 2019 at 07:05):

Are there any updates on graphQL support?

view this post on Zulip Branko Mlikota (Mar 05 2021 at 11:18):

Please help,

does anybody know how to use ca.uhn.fhir.jpa.provider.GraphQLProvider?

I would like to execute something like
http://localhost:8091/fhir/CodeSystem/7/$graphql?query={name,status,concept(_count:2,_offset:3){code,definition}}

through hapi fhir client
https://hapifhir.io/hapi-fhir/docs/client/introduction.html

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

Could someone chime in on how is the GraphQL support in 5.4? Is it now production ready and out of experimental feature mode?

view this post on Zulip dsh (Apr 23 2021 at 06:28):

@James Agnew please let us know if GraphQL is supported is HAPI >= 5.3

On 5.3 with graphql_enabled: true when I execute this query /fhir/$graphql?query={Patient(id:113257687){id,name{given,family}}} I get the following response

HTTP Status 400 – Bad Request

Type Exception Report

Message Invalid character found in the request target [/fhir/$graphql?query={Patient(id:113257687){id,name{given,family}}}]. The valid characters are defined in RFC 7230 and RFC 3986

Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

Exception

java.lang.IllegalArgumentException: Invalid character found in the request target [/fhir/$graphql?query={Patient(id:113257687){id,name{given,family}}}]. The valid characters are defined in RFC 7230 and RFC 3986
    org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:486)
    org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:261)
    org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
    org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    java.base/java.lang.Thread.run(Thread.java:834)

Note The full stack trace of the root cause is available in the server logs.
Apache Tomcat/9.0.38

Any idea ? Is something wrong in my application.yml ?

view this post on Zulip dsh (Apr 23 2021 at 06:35):

Does anyone know if GraphQL is supported in HAPI FHIR open source or is it only in Paid version?

view this post on Zulip dsh (Apr 24 2021 at 00:31):

@Josh Mandel ^if you are the right person please opine, thanks

view this post on Zulip Jordi Cabré (Jun 15 2021 at 14:46):

Is there any way to get graphql schema?

view this post on Zulip Grahame Grieve (Jun 15 2021 at 19:55):

there's code to generate the schema somewhere, but I don't know that's hooked up

view this post on Zulip Venu Gopal (Jun 15 2021 at 22:33):

@Grahame Grieve I'd be interested to know if its there. AFAIK, Asymmetrik guys did it using some tool either they developed or facebook provided. This is important because there are a lot schemas, inputs, search params..

view this post on Zulip Grahame Grieve (Jun 15 2021 at 22:34):

this is the core code: org.hl7.fhir.r5.utils.GraphQLSchemaGenerator

Someone like @James Agnew would have to comment about hooking it up in HAPI

view this post on Zulip Jordi Cabré (Jun 16 2021 at 12:16):

@James Agnew Any idea?

view this post on Zulip Jordi Cabré (Jun 17 2021 at 08:45):

Is there any way to perform a graphql asyncrhonously?

view this post on Zulip Grahame Grieve (Jun 17 2021 at 11:32):

I think that the async pattern should work for that

view this post on Zulip Jordi Cabré (Jun 18 2021 at 07:07):

What do you mean exactly? I played with Prefer: respond-async header. But it doesn't work...

view this post on Zulip dsh (Aug 05 2021 at 16:09):

Using GraphQL is it possible to do population health queries e.g. count of COVID-19 patients (i.e. condition code = "U07.1" ) ?

view this post on Zulip Pavel Pilar (Sep 06 2021 at 13:33):

I'm facing similar problem here. I'd like to run GraphQL query on CodeSystem or ValueSet, but whatever I do I get 400.
The best I get is { "data": {}} for URL .../fhir/r4/$graphql?query=
@James Agnew how should graphql query look like in case of CodeSystems when I'd like to search for text pattern on display name? I'm using version 5.4


Last updated: Apr 12 2022 at 19:14 UTC