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
React Query added support to type Query and Mutation keys in #8521:
Typing query and mutation keys
Registering the query and mutation key types
Also similarly to registering a global error type, you can also register a global QueryKey and MutationKey type. This allows you to provide more structure to your keys, that matches your application's hierarchy, and have them be typed across all of the library's surface area. Note that the registered type must extend the Array type, so that your keys remain an array.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
React Query added support to type Query and Mutation keys in #8521:
Let's add support for that in Orval? It would allow for a simple and type-safe custom options per-mutation, e.g.
cc:
Beta Was this translation helpful? Give feedback.
All reactions