Skip to content

Conversation

@manudeli
Copy link

@manudeli manudeli commented Jan 14, 2026

fix: #2931

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@changeset-bot
Copy link

changeset-bot bot commented Jan 14, 2026

⚠️ No Changeset found

Latest commit: e1e8f8f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Jan 14, 2026

@manudeli is attempting to deploy a commit to the Hey API Team on Vercel.

A member of the Team first needs to authorize it.

.pretty()
.hint('@ts-ignore')
.prop('initialPageParam', $.object().pretty().as('any'))
.prop('getNextPageParam', $.func().as('any'))
Copy link
Member

Choose a reason for hiding this comment

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

This feels very dirty. Is the issue that the inferred type doesn't contain initialPageParam and getNextPageParam? Why not add a second argument and require them?

Copy link
Author

Choose a reason for hiding this comment

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

Why not add a second argument and require them?

Could you give me code example please? I need more detail

tags: [],
},
}),
getNextPageParam: (lastPage) => lastPage.map(({ name }) => name),
Copy link
Member

Choose a reason for hiding this comment

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

What would happen if you omit this line? Would the types not complain? Would the runtime code likely crash?

Copy link
Author

Choose a reason for hiding this comment

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

like below

_______________________________2026-01-27______________9 14 12

In the original implementation, even if we omitted getNextPageParam, TypeScript didn’t complain either

_______________________________2026-01-27______________9 13 56

},
}),
getNextPageParam: (lastPage) => lastPage.map(({ name }) => name),
initialPageParam: { query: { tags: [] } },
Copy link
Member

@mrlubos mrlubos Jan 14, 2026

Choose a reason for hiding this comment

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

The other reason this smells is if you place this line BEFORE the generated options, it won't get applied. I think we either want to keep options as they were (not setting this property) or require this property if it's needed

Enhance the OpenAPI configuration to include pagination options and update the App component to utilize both infinite and suspense infinite queries for fetching pets by tags. Introduce new utility functions for infinite query handling in the generated client code.
@manudeli manudeli force-pushed the fix/react-query/infiniteQueryOptions-should-work-with-useSuspenseInfiniteQuery branch from 8ba03a1 to e1e8f8f Compare January 27, 2026 12:00
@manudeli manudeli marked this pull request as ready for review January 27, 2026 12:09
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug 🔥 Broken or incorrect behavior. labels Jan 27, 2026
@manudeli manudeli marked this pull request as draft January 27, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🔥 Broken or incorrect behavior. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InfiniteOptions aren't compatible with useSuspenseInfiniteQuery

2 participants