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
-[Clearing and unsubscribing from updates](#clearing-and-unsubscribing-from-updates-arrow_up)
@@ -144,15 +144,15 @@ most of the time anymore.
144
144
`createQueryNormalizer` accepts two arguments:
145
145
146
146
-`queryClient` - this is just a react-query instance you create by `new QueryClient(config)`,
147
-
-`normalizerConfig` - this is `normy` config, which you might need to meet requirements for data normalisation to work - see
147
+
-`normalizerConfig` - this is `normy` config, which you might need to meet requirements for data normalization to work - see
148
148
[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)
149
149
150
-
## Disabling of normalisation per query and mutation [:arrow_up:](#table-of-content)
150
+
## Disabling of normalization per query and mutation [:arrow_up:](#table-of-content)
151
151
152
152
By default all your queries and mutations will be normalized. That means that for each query there will be normalized representation
153
153
of its data and for each mutation its response data will be read and all dependent normalized queries will be updated.
154
154
155
-
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
+
However, it does not always make sense to normalize all data. You might want to disable data normalization, for example for performance reason for some extreme big queries,
156
156
or just if you do not need it for a given query, for instance if a query data will be never updated.
157
157
158
158
Anyway, you might want to change this globally by passing `normalize` to `createQueryNormalizer`:
@@ -216,8 +216,8 @@ The above code will immediately update all queries which have object with `id: 1
216
216
a mutation error, data will be reverted to original `rollbackData`.
217
217
218
218
It will work at the same time as a normal mutation too, so on mutation success, all dependent queries will be updated
219
-
again. If you are sure about the response structure, you might want to disable normalisation for this mutation,
220
-
so that on successful response the normalisation won't be repeted unnecessarily:
219
+
again. If you are sure about the response structure, you might want to disable normalization for this mutation,
220
+
so that on successful response the normalization won't be repeted unnecessarily:
0 commit comments