0

I am working on a GRANDstack (GraphQL-React-Apollo-Neo4jDatabase) project and got told that it now needs an additional REST-API without making huge changes to the existing backend and GraphQL-API. And of course we have to be quick about it.

We found this (Apollo Gateway): https://medium.com/tkssharma/an-api-gateway-is-a-microservice-pattern-where-a-separate-service-is-built-to-sit-in-front-of-your-be4b16861d40

We plan on using this to set that new REST-API on top because we know we will need microservices soon enough as well. So I guess, this can be set up in some form with the already included Apollo. But I have yet to fully understand it.

Does anyone have some experience with this? Or does anyone know a project that implements this and can be checked out? I'd like more material about this that contains actual code. Especially about setting up such a gateway to put a REST-API on top.

If there is something easier and better documented than this Apollo gateway, please let me know! Open to ideas, but not complete overkills (Though we are not allowed to just put REST directly into our backend, it has to stay quite untouched).

Thank you very much!

In short: Our current backend offers GraphQL-API which works just fine. But one of our customers (in this picture "client") needs a REST-API. So we hope on using a gateway (?) which should be placed before/upon our backend in a separate docker container probably, takes in HTTP-requests from the user and then asks our backend in graphQL for the needed data. visualization

  • Are you asking for further links to open source projects, libaries or tooling? If so, this isn't in scope with SO guidelines and thus a reason to close your question as such, off-topic. [Here](https://twitter.com/fielding/status/1052976631374000128?lang=en) is Fielding's take on GraphQL with REST and this should give some hints on how this could be done. – Roman Vottner Apr 03 '22 at 15:00
  • I am looking for the best solution(s) according to what is given and as I am rather inexperienced in this topic, hoped for material on how to do it. But I can see now that this is probably not in terms with the SO guidelines, sorry! Thank you for the link though! – Katastrophenmagnet Apr 03 '22 at 18:52

1 Answers1

0

If anyone ever stumbles upon this, we decided to do the following:

Since we have to be quick about it, we will set up another docker container, that contains a small server, which accepts data via a REST-API. Depending on the received data, it calls specific GraphQL-Queries/Mutations on our backend. Easy. No additional 3rd-party software. Simple just wins.

Have a good one!