Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

(react/preact) - Force suspense to be disabled for executeQuery calls (#1181)

Fix #1180

authored by

Phil Pluckthun and committed by
GitHub
685ca182 b48652b4

+12 -2
+6
.changeset/hungry-penguins-teach.md
··· 1 + --- 2 + '@urql/preact': patch 3 + 'urql': patch 4 + --- 5 + 6 + Add `suspense: false` to options when `executeQuery` is called explicitly.
+3 -1
packages/preact-urql/src/hooks/useQuery.ts
··· 175 175 176 176 // This is the imperative execute function passed to the user 177 177 const executeQuery = useCallback( 178 - (opts?: Partial<OperationContext>) => update(makeQuery$(opts)), 178 + (opts?: Partial<OperationContext>) => { 179 + update(makeQuery$({ suspense: false, ...opts })); 180 + }, 179 181 [update, makeQuery$] 180 182 ); 181 183
+3 -1
packages/react-urql/src/hooks/useQuery.ts
··· 175 175 176 176 // This is the imperative execute function passed to the user 177 177 const executeQuery = useCallback( 178 - (opts?: Partial<OperationContext>) => update(makeQuery$(opts)), 178 + (opts?: Partial<OperationContext>) => { 179 + update(makeQuery$({ suspense: false, ...opts })); 180 + }, 179 181 [update, makeQuery$] 180 182 ); 181 183