Questions tagged [urql]

Formidable urlq GraphQL client

The Formidable Javascript GraphQL client

113 questions
0
votes
0 answers

Problem Updating Graphql Cache after Mutation

I currently am using graphql to handle a user logging in and to test that the cache is updating I am just trying to hardcode in values for the cache to update to on login. Below is what my client looks like, so I am using graphcache to try and get…
0
votes
1 answer

Svelte URQL only sends text/plain as a Content-Type

I am trying to make my graphQL requests have a Content-Type of 'application/json` using Svelte and URQL. However, every request has a Content-Type of 'text/plain;charset=UTF-8' which my server will not accept. My code is - initClient({ …
brendangibson
  • 2,377
  • 2
  • 21
  • 36
0
votes
1 answer

Nextjs urql auth exchange running on server when it should run on client

When trying to add an auth exchange to my urql client, it gets run on the server when the app starts and on the client subsequent times until refresh. The problem is in my getAuth function, which is as follows: const getAuth = async ({ authState })…
Anthony Bias
  • 515
  • 3
  • 20
0
votes
1 answer

Why data is suddendly null here?

Why this behavior? Reproduction steps: Go to https://stackblitz.com/edit/sveltejs-kit-template-default-9dvq26 Open a new window of the same stackblitz project Click on the button "Delete Team" Suddendly the worst becomes reality in the other…
Fred Hors
  • 3,258
  • 3
  • 25
  • 71
0
votes
0 answers

How do I get urql graphql data in another component

I have code like this in my __layout.svelte file const store = operationStore(QUERY_CURRENT_USER); query(store); and I can successfully use it like this in that same component like this $store.data.firstName My problem is that I cannot…
brendangibson
  • 2,377
  • 2
  • 21
  • 36
0
votes
1 answer

The normalized cache in this REPRO is not updating an entity field, why?

The normalized caching in this REPRO with urql and svelte is not updating an entity field. Steps: Go to https://stackblitz.com/edit/sveltejs-kit-template-default-6tzo2i open a new terminal with the + icon start apollo-server with: cd server && npm…
Fred Hors
  • 3,258
  • 3
  • 25
  • 71
0
votes
1 answer

Sending Auth token in URQL query

I'm trying to send the token inside URQL token but there is no method or description in the docs. I've the token stored in my localStorage using localStorage.set() method. Anyone has any idea how to send the auth token inside query or header? I…
0
votes
1 answer

Error: use* functions may only be called during the `setup()` or other lifecycle hooks

I have this simple code inside