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
Copy file name to clipboardExpand all lines: packages/normy-react-query/README.md
+9-2
Original file line number
Diff line number
Diff line change
@@ -144,16 +144,23 @@ the official `QueryClient` and you can use all `react-query` features normally.
144
144
-`reactQueryConfig` - this is just normal `react-query` config, which you would pass as `new QueryClient(reactQueryConfig)`,
145
145
with `normy` you can do it with `createNormalizedQueryClient(reactQueryConfig)`
146
146
-`normalizerConfig` - this is `normy` config, which you might need to meet requirements for data normalisation to work - see
147
-
[explanation](https://github.com/klis87/normy/tree/master/#required-conditions-arrow_up) for more details.
147
+
[explanation](https://github.com/klis87/normy/tree/master/#required-conditions-arrow_up) for more details. Additionally to `normy` config, you can also pass `normalize` option, which is `true` by default - if you pass `false`, nothing will be normalized unless explicitely set (see the next paragraph)
148
148
149
149
## Disabling of normalisation per query and mutation [:arrow_up:](#table-of-content)
150
150
151
151
By default all your queries and mutations will be normalized. That means that for each query there will be normalized representation
152
152
of its data and for each mutation its response data will be read and all dependent normalized queries will be updated.
153
153
154
-
You might want to disable data normalisation per query/mutation, for example for performance reason for some extreme big queries,
154
+
However, it does not always make sense to normalize all data. You might want to disable data normalisation, for example for performance reason for some extreme big queries,
155
155
or just if you do not need it for a given query, for instance if a query data will be never updated.
156
156
157
+
Anyway, you might want to change this globally by passing `normalize` to `createNormalizedQueryClient`:
0 commit comments