Skip to content

Update tanstack/query to v5#871

Merged
loichuder merged 1 commit into
mainfrom
tanstack-update
Jun 10, 2026
Merged

Update tanstack/query to v5#871
loichuder merged 1 commit into
mainfrom
tanstack-update

Conversation

@loichuder

Copy link
Copy Markdown
Member

Biggest change is useQuery{..., suspense: true} is now useSuspenseQuery: https://tanstack.com/query/latest/docs/framework/react/guides/migrating-to-v5#new-hooks-for-suspense

I also had to rework the useWorkflow query (see below)

Comment thread src/api/workflows.ts
queryFn: () => {
assertDefined(id);
return fetchWorkflow(id);
return id ? fetchWorkflow(id) : null;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IT is no longer possible to disable a suspense query in v5.

Therefore, I now return null if id is undefined. The hook is used at a single place (Canvas) that already accounts for the fact the workflow can be null.

@loichuder loichuder requested a review from axelboc June 10, 2026 11:40
@loichuder loichuder merged commit 78acb22 into main Jun 10, 2026
2 checks passed
@loichuder loichuder deleted the tanstack-update branch June 10, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants