Open bbigras opened 1 year ago
Any ideas?
Hi @bbigras, Since qwik has changed its API so much since this project started, i was waiting for the new server actions API to be released.
Since then Ive learnt that getting Urql working with Qwik means we have to sacrifice a bunch of great functionality from both Qwik and Urql. They actually solve the same problems.
Using graphql with Qwik should be done as once off requests in an onGet, loader$, or action$. And you should then make use of native Qwik elements to handle prefetching, state, and reactivity.
I havent reach this point yet in my own project as Im first rolling out our static pages, but when I get to it I'll look into a new way to integrate graphql with just loaders, actions, and endpoints, making most of this project redundant.
To reproduce:
Btw, with
npm run dev
the code works and fetches data from a public star wars api at https://swapi-graphql.netlify.app/.netlify/functions/indexnpm: '9.3.1', node: '18.14.0',