-
The examples on this page are helpful, but only cover simplistic use cases. If I have a structure like this returned from GraphQL: {
"items": [
{ "id": 1, "label": "Hello" },
{ "id": 2, "label": "Bye" }
]
} how do I call Currently, I'm using Immutable.js to deeply set the value using a path locator like |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
There's nothing special in React Query here - it's up to you to transform data in an immutable way. You can of course use immutable.js or something like immerjs if you want.
I'd just do:
|
Beta Was this translation helpful? Give feedback.
-
Ok, just double-checking to see if there wasn't some built-in way I was missing. We're using Immutable and it works fine. Thanks! |
Beta Was this translation helpful? Give feedback.
There's nothing special in React Query here - it's up to you to transform data in an immutable way. You can of course use immutable.js or something like immerjs if you want.
I'd just do: