Tested with Apollo 3.5.6 - that version and upgrades can break compatibility. Once we have that working then let's test any newer version which might be currently available.
npm i -D @apollo/client@3.5.6 dotenv graphql@15.8 graphql-tag node-fetch svelte-preprocess
- Rename
.env.exmple
to.env
and add your endpoint and, for example, Hasurax-hasura-admin-secret
- Create
src/lib/utilities/apolloClient.js
and update line 26 for the right authorisation - Patch the Apollo client
./patch-apollo-client.sh
- Integrate the patch into the build script to run when the host builds the site: Update the build script in the package.json
- Use the Apollo client
src/routes/+page.server.js