···11+---
22+'@urql/preact': patch
33+'@urql/svelte': patch
44+'urql': patch
55+'@urql/solid': patch
66+'@urql/vue': patch
77+---
88+99+Add type for `hasNext` to the query and mutation results
···4545 data?: Data;
4646 /** The {@link OperationResult.error} for the executed mutation. */
4747 error?: CombinedError;
4848+ /** The {@link OperationResult.hasNext} for the executed query. */
4949+ hasNext: boolean;
4850 /** The {@link OperationResult.extensions} for the executed mutation. */
4951 extensions?: Record<string, any>;
5052 /** The {@link Operation} that the current state is for.
···164166 fetching: false,
165167 stale: result.stale,
166168 data: result.data,
169169+ hasNext: result.hasNext,
167170 error: result.error,
168171 extensions: result.extensions,
169172 operation: result.operation,
+7-3
packages/preact-urql/src/hooks/useQuery.ts
···137137 * last `Operation` that the current state was for.
138138 */
139139 operation?: Operation<Data, Variables>;
140140+ /** The {@link OperationResult.hasNext} for the executed query. */
141141+ hasNext: boolean;
140142}
141143142144/** Triggers {@link useQuery} to execute a new GraphQL query operation.
···303305 return pipe(
304306 query$$,
305307 switchMap(query$ => {
306306- if (!query$) return fromValue({ fetching: false, stale: false });
308308+ if (!query$)
309309+ return fromValue({ fetching: false, stale: false, hasNext: false });
307310308311 return concat([
309312 // Initially set fetching to true
310313 fromValue({ fetching: true, stale: false }),
311314 pipe(
312315 query$,
313313- map(({ stale, data, error, extensions, operation }) => ({
316316+ map(({ stale, data, error, extensions, operation, hasNext }) => ({
314317 fetching: false,
315318 stale: !!stale,
319319+ hasNext,
316320 data,
317321 error,
318322 operation,
···320324 }))
321325 ),
322326 // When the source proactively closes, fetching is set to false
323323- fromValue({ fetching: false, stale: false }),
327327+ fromValue({ fetching: false, stale: false, hasNext: false }),
324328 ]);
325329 }),
326330 // The individual partial results are merged into each previous result
···125125 data?: Data;
126126 /** The {@link OperationResult.error} for the executed query. */
127127 error?: CombinedError;
128128+ /** The {@link OperationResult.hasNext} for the executed query. */
129129+ hasNext: boolean;
128130 /** The {@link OperationResult.extensions} for the executed query. */
129131 extensions?: Record<string, any>;
130132 /** The {@link Operation} that the current state is for.
+4
packages/solid-urql/src/createMutation.ts
···4444 * last `Operation` that the current state was for.
4545 */
4646 operation?: Operation<Data, Variables>;
4747+ /** The {@link OperationResult.hasNext} for the executed query. */
4848+ hasNext: boolean;
4749};
48504951/** Triggers {@link createMutation} to execute its GraphQL mutation operation.
···140142 const initialResult: CreateMutationState<Data, Variables> = {
141143 operation: undefined,
142144 fetching: false,
145145+ hasNext: false,
143146 stale: false,
144147 data: undefined,
145148 error: undefined,
···167170 error: result.error,
168171 extensions: result.extensions,
169172 operation: result.operation,
173173+ hasNext: result.hasNext,
170174 });
171175 });
172176 }),