Skip to content
This repository was archived by the owner on Mar 16, 2023. It is now read-only.

preview: QWIK ERROR Error: Code(31) s_UTUJN6N3MNA #86

Open
bbigras opened this issue Feb 10, 2023 · 2 comments
Open

preview: QWIK ERROR Error: Code(31) s_UTUJN6N3MNA #86

bbigras opened this issue Feb 10, 2023 · 2 comments

Comments

@bbigras
Copy link

bbigras commented Feb 10, 2023

To reproduce:

git clone https://github.com/bbigras/test-qwik-urql.git
cd test-qwik-urql
npm install
npm run preview

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/index

[...]
✓ Built client modules


> build.preview
> vite build --ssr src/entry.preview.tsx

vite v4.1.1 building SSR bundle for production...
transforming...
✓ 21 modules transformed.
rendering chunks...
server/build/q-e222b46d.css   1.64 kB
server/entry.preview.mjs     50.27 kB
✓ Built preview (ssr) modules
✓ Lint checked

  ➜  Local:   http://localhost:4173/
  ➜  Network: use --host to expose
QWIK ERROR Error: Code(31) s_UTUJN6N3MNA
[Error: Code(31)]
Error: Code(31)

npm: '9.3.1',
node: '18.14.0',

@bbigras
Copy link
Author

bbigras commented Feb 14, 2023

Any ideas?

@DustinJSilk
Copy link
Owner

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants