Graphql support in hapi-fhir-plain-server

600 views
Skip to first unread message

jmo...@healthcentrix.com

unread,
Aug 26, 2020, 8:37:17 PM8/26/20
to HAPI FHIR

How could I support graphql in a fhir proxy project using hapi-fhir-plain-server?

- creating an interceptor like the fhirpath interceptor in hapi-fhir-plain-server?
or...
- creating a grapqlprovider based on the hapi-fhir-jpa-server implementation of the GraphqlProvider class?

Thanks in advance for any guidance

Regards

Nguyễn Hải Phong

unread,
Aug 26, 2020, 10:29:08 PM8/26/20
to HAPI FHIR

jmo...@healthcentrix.com

unread,
Aug 27, 2020, 12:33:55 AM8/27/20
to HAPI FHIR
Yes. Thanks.

But the results are not compatible for a graphql client. 

In my understanding, fhirpath is good to use in order to make more complex queries, even inside of a graphql query.

I guess the best way to implement Graphql in plainserver is building a new GraphqlProvider in plain-server similar to the same in jpaserver.

Regards

Nguyễn Hải Phong

unread,
Aug 27, 2020, 5:32:11 AM8/27/20
to HAPI FHIR
Hi,

There is something to note:
1. In nornal request, you will get the Bundle resource with Entry filled with designed resource; but with FHIR-Path Interceptor, you will get Parameter resource instead. 
2. You use FHIR-Path where you want to get a piece of information you wanted (not a whole resource) for network usage. And i do not think it have anything to do with complex queries. You can do other ways for complex queries.
3. Sorry for misunderstanding, i checked again with FHIR Spec for GraphQL using (here) , and i do not see any build-in interceptor is good for this. Guess you are right! We have to implement a custome one for GraphQL.

PhongNH,

Rudolf Ermantraut

unread,
May 11, 2021, 7:17:59 AM5/11/21
to HAPI FHIR
does a solution for this already exist?
Reply all
Reply to author
Forward
0 new messages