How to Run Apollo GraphQL in a QWIK Endpoint

--

QWIK + Apollo

Short version

Long version

Highlights:

  • starting with setting up QWIK and Apollo server
  • we’ll add a couple of routes
  • one to expose the GraphQL as an endpoint
  • one to consume it
  • in the endpoint we’ll use code inspired by the expressMiddlware for Apollo server 4 and update it so it works with the QWIK RequestHandler interface
  • on the consuming side
  • fetch will need a slighly different URL when working on the server (SSR) vs the client so we’ll use the onRequest and routeLoader to provide the URL from QWIK down to the gqlCall function

Read more over at https://dev.to/gparlakov/how-to-run-apollo-graphql-in-a-qwik-endpoint-15p2

--

--

Georgi Parlakov
Georgi Parlakov

Written by Georgi Parlakov

Angular and DotNet dev. RxJs explorer. Testing proponent. A dad. Educative.io course author. https://gparlakov.github.io/

No responses yet