Skip to content

Commit 25ad6d3

Browse files
authored
Fix missing changeset (#1371)
* Add changeset * Revert version changes * Remove bad rebase * Add missing permissions
1 parent 98e9d8c commit 25ad6d3

6 files changed

Lines changed: 14 additions & 11 deletions

File tree

.changeset/shaky-queens-sell.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@graphql-codegen/typescript-react-query': patch
3+
'@graphql-codegen/typescript-solid-query': patch
4+
---
5+
6+
Query keys should be shared between suspense and non-suspense hooks to ensure consistent state
7+
management and synchronization, preventing discrepancies and maintaining a single source of truth
8+
for query invalidation.

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Setup env
2929
uses: the-guild-org/shared-config/setup@main
3030
with:
31-
nodeVersion: 18
31+
nodeVersion: 24
3232
- name: Prettier Check
3333
run: yarn prettier:check
3434
dev-tests:

.github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main
2929
permissions:
3030
id-token: write # allows ODIC publishing
31+
contents: write
3132
with:
3233
releaseScript: release
3334
nodeVersion: 24

packages/plugins/typescript/react-query/src/fetcher.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,7 @@ export abstract class FetcherRenderer {
135135
>(${argumentsResult}) => {
136136
${implHookOuter}
137137
return ${query.getHook()}<${operationResultType}, TError, TData>(
138-
${this.generateQueryFormattedParameters(
139-
this.generateQueryKey(config),
140-
implFetcher,
141-
)}
138+
${this.generateQueryFormattedParameters(this.generateQueryKey(config), implFetcher)}
142139
)};`;
143140
};
144141

packages/plugins/typescript/react-query/tests/__snapshots__/react-query.spec.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ export const useSuspenseTestQuery = <
14391439
14401440
return useSuspenseQuery<TestQuery, TError, TData>(
14411441
{
1442-
queryKey: variables === undefined ? ['testSuspense'] : ['testSuspense', variables],
1442+
queryKey: variables === undefined ? ['test'] : ['test', variables],
14431443
queryFn: fetcher<TestQuery, TestQueryVariables>(dataSource.endpoint, dataSource.fetchParams || {}, TestDocument, variables),
14441444
...options
14451445
}
@@ -1478,7 +1478,7 @@ export const useSuspenseInfiniteTestQuery = <
14781478
(() => {
14791479
const { queryKey: optionsQueryKey, ...restOptions } = options;
14801480
return {
1481-
queryKey: optionsQueryKey ?? variables === undefined ? ['test.infiniteSuspense'] : ['test.infiniteSuspense', variables],
1481+
queryKey: optionsQueryKey ?? variables === undefined ? ['test.infinite'] : ['test.infinite', variables],
14821482
queryFn: (metaData) => fetcher<TestQuery, TestQueryVariables>(dataSource.endpoint, dataSource.fetchParams || {}, TestDocument, {...variables, ...(metaData.pageParam ?? {})})(),
14831483
...restOptions
14841484
}

packages/plugins/typescript/solid-query/src/fetcher.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,7 @@ export abstract class FetcherRenderer {
125125
>(${argumentsResult}) => {
126126
${implHookOuter}
127127
return ${query.getHook()}<${operationResultType}, TError, TData>(
128-
${this.generateQueryFormattedParameters(
129-
this.generateQueryKey(config),
130-
implFetcher,
131-
)}
128+
${this.generateQueryFormattedParameters(this.generateQueryKey(config), implFetcher)}
132129
)};`;
133130
};
134131

0 commit comments

Comments
 (0)