So I have a project using the latest Next.js 13, React 18, Urql 3, and using typescript
Currently, I have issues when trying to query the urql from the getstaticprops function. My urql request needs a guest token, and I'm storing the token on…
I have defined my query as so:
import * as Urql from 'urql';
export function useIsFollowingQuery(options: Omit, 'query'>) {
return Urql.useQuery({ query: IsFollowingDocument,…
I am using urql-react as my React client in a project. I need to make sure that any date variables in query/mutation with Date scalar type are serialized into YYYY-DD-MM format while for DateTime scalar type, the date object is serialized in…
Im using Typescript, React- and graphql with the urql client library.
My Query looks something like this:
query objectId($id: Int!) {
object(id: $id) {
id
name
__typename
}
}
This is how I call the query:
const [{ data…
Say I have the following fragment:
fragment ConversationSnippet on Conversation {
uuid
unreadMessages
profileThatHasUnreadMessages
updatedAt
createdAt
profiles{
...ConversationProfileSnippet
}
messages{
…
How to make an Exchange (cache-and-network) to return data from cache immediately and then wait second and make network request to update cache (offline)?
I'm looking at customizing how URQL caches API responses by userId, but having trouble figuring this out. I'd like to be able to console log the entire URQL cache, to check what is being stored. Is there any way to do that?
I am following Ben Awad's "Fullstack React GraphQL TypeScript Tutorial" on youtube. It is a few years old, so I am scrambling to modify the code to work with updated packages, specifically here urql-graphcache.
If you are also following along, I'm…
My application has a list of organizations and I have buttons in my UI to delete them individually.
I would like the list to update and remove the deleted organization but that is not working for me.
I have set up a cache exchange like this, where I…
i can't get urql subscriptions to work with NextJS because of imports problem.
Basically i'm using this graphql-ws lib that is recommended in urql docs, that needs ws implementation library (eg: 'ws'). And when i import WebSocket from 'ws' i get…
I'm a newbie in websockets.
I use urql and graphql-ws (migrated from subscriptions-transport-ws) to get graphql subscriptions. The code is following:
export const useUrqlClient = () => {
const headers = useHeaders();
const client = useMemo(() =>…
When a prop passed from the parent changes, and is used as a parameter of an urql query, the query does not seem to be reexecuted.
I see many examples such as:
export let id;
const store = operationStore(query, { id })
query(store)
But why there…
I'm using urql and Svelte for a new web app.
I ran into a logical problem that I can't figure out how to best solve.
Suppose I have many todos and the list of these todos is already cached on my phone browser.
While I'm on the subway (very slow…
I am using nextJS and urqlClient for ssr. I have ssr turned off in all my pages at the moment. The issue that i am facing is the following. I have profile page which renders data after fetching the user from graphql. If the user is not found it will…
I have a Vite + Typescript + Vue 3 SPA using "script setup". The app uses Urql to query a GrapgQL endpoint.
I have a situation where query works and displays rows only after the component with the component is hotloaded.
Sequence of events:
load…