Skip to content

Conversation

@manudeli
Copy link

@manudeli manudeli commented Jan 14, 2026

fix: #2931

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.
@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: 8ba03a1

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?

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?

},
}),
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

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.

InfiniteOptions aren't compatible with useSuspenseInfiniteQuery

2 participants