Replies: 1 comment 3 replies
-
do you have updates on this? thinking of the same thing. and still can't figure this out |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, is there a way to specify different return types for a query? For example, If I have an endpoint that may return
Post
orEnrichedPost
can I somehow tell typescript which will be the return type based on thepostType
argument?useGetPostsQuery({ postType: 'normal' })
<-- In this case I would like currentData to be of typePost
useGetPostsQuery({ postType: 'enriched' })
<-- In this case I would like currentData to be of typeEnrichedPost
. Thanks in advance.Beta Was this translation helpful? Give feedback.
All reactions