You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generated hook code for infinite queries applies the spread operator on metaData.pageParam, which is of type unknown. Typescript complains about this.
Your Example Website or App
/
Steps to Reproduce the Bug or Issue
My query has an after variable with a custom fetcher that has this signature:
The generated code is free of errors from Typescript. If the spread operator needs to be applied here (to pass the page variables into the query), perhaps the generated code could cast metadata.pageParam into an object?
Which packages are impacted by your issue?
@graphql-codegen/typescript-react-query
Describe the bug
The generated hook code for infinite queries applies the spread operator on
metaData.pageParam
, which is of typeunknown
. Typescript complains about this.Your Example Website or App
/
Steps to Reproduce the Bug or Issue
My query has an
after
variable with a custom fetcher that has this signature:My query looks like:
Expected behavior
The generated code is free of errors from Typescript. If the spread operator needs to be applied here (to pass the page variables into the query), perhaps the generated code could cast
metadata.pageParam
into an object?Screenshots or Videos
Platform
graphql
version: 16.8.1@graphql-codegen/*
version(s): 5 for CLI, deps:The text was updated successfully, but these errors were encountered: