@contentful/field-editor-reference 7.0.9 → 7.0.10-canary.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -282,11 +282,15 @@ const [InternalServiceProvider, useFetch, useEntityLoader, useCurrentIds] = (0,
|
|
|
282
282
|
]);
|
|
283
283
|
const fetch = (0, _react.useCallback)(function fetch(queryKey, fn, options = {}) {
|
|
284
284
|
const { priority, ...queryOptions } = options;
|
|
285
|
-
return queryClient.fetchQuery(
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
285
|
+
return queryClient.fetchQuery({
|
|
286
|
+
queryKey,
|
|
287
|
+
queryFn: ()=>queryQueue.add(()=>fn({
|
|
288
|
+
cmaClient
|
|
289
|
+
}), {
|
|
290
|
+
priority
|
|
291
|
+
}),
|
|
292
|
+
...queryOptions
|
|
293
|
+
});
|
|
290
294
|
}, [
|
|
291
295
|
queryClient,
|
|
292
296
|
queryQueue,
|
|
@@ -488,12 +492,16 @@ const [InternalServiceProvider, useFetch, useEntityLoader, useCurrentIds] = (0,
|
|
|
488
492
|
releaseId: releaseId
|
|
489
493
|
});
|
|
490
494
|
} else {
|
|
491
|
-
await queryClient.invalidateQueries(
|
|
495
|
+
await queryClient.invalidateQueries({
|
|
496
|
+
queryKey: query.queryKey
|
|
497
|
+
});
|
|
492
498
|
return;
|
|
493
499
|
}
|
|
494
500
|
queryClient.setQueryData(query.queryKey, freshData);
|
|
495
501
|
} catch (error) {
|
|
496
|
-
await queryClient.invalidateQueries(
|
|
502
|
+
await queryClient.invalidateQueries({
|
|
503
|
+
queryKey: query.queryKey
|
|
504
|
+
});
|
|
497
505
|
}
|
|
498
506
|
}));
|
|
499
507
|
}
|
|
@@ -506,7 +514,9 @@ const [InternalServiceProvider, useFetch, useEntityLoader, useCurrentIds] = (0,
|
|
|
506
514
|
if (dataReleaseId === releaseId) {
|
|
507
515
|
queryClient.setQueryData(queryKey, data);
|
|
508
516
|
} else if (releaseId && !dataReleaseId) {
|
|
509
|
-
void queryClient.invalidateQueries(
|
|
517
|
+
void queryClient.invalidateQueries({
|
|
518
|
+
queryKey
|
|
519
|
+
});
|
|
510
520
|
}
|
|
511
521
|
});
|
|
512
522
|
};
|
|
@@ -194,11 +194,15 @@ const [InternalServiceProvider, useFetch, useEntityLoader, useCurrentIds] = cons
|
|
|
194
194
|
]);
|
|
195
195
|
const fetch = useCallback(function fetch(queryKey, fn, options = {}) {
|
|
196
196
|
const { priority, ...queryOptions } = options;
|
|
197
|
-
return queryClient.fetchQuery(
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
197
|
+
return queryClient.fetchQuery({
|
|
198
|
+
queryKey,
|
|
199
|
+
queryFn: ()=>queryQueue.add(()=>fn({
|
|
200
|
+
cmaClient
|
|
201
|
+
}), {
|
|
202
|
+
priority
|
|
203
|
+
}),
|
|
204
|
+
...queryOptions
|
|
205
|
+
});
|
|
202
206
|
}, [
|
|
203
207
|
queryClient,
|
|
204
208
|
queryQueue,
|
|
@@ -400,12 +404,16 @@ const [InternalServiceProvider, useFetch, useEntityLoader, useCurrentIds] = cons
|
|
|
400
404
|
releaseId: releaseId
|
|
401
405
|
});
|
|
402
406
|
} else {
|
|
403
|
-
await queryClient.invalidateQueries(
|
|
407
|
+
await queryClient.invalidateQueries({
|
|
408
|
+
queryKey: query.queryKey
|
|
409
|
+
});
|
|
404
410
|
return;
|
|
405
411
|
}
|
|
406
412
|
queryClient.setQueryData(query.queryKey, freshData);
|
|
407
413
|
} catch (error) {
|
|
408
|
-
await queryClient.invalidateQueries(
|
|
414
|
+
await queryClient.invalidateQueries({
|
|
415
|
+
queryKey: query.queryKey
|
|
416
|
+
});
|
|
409
417
|
}
|
|
410
418
|
}));
|
|
411
419
|
}
|
|
@@ -418,7 +426,9 @@ const [InternalServiceProvider, useFetch, useEntityLoader, useCurrentIds] = cons
|
|
|
418
426
|
if (dataReleaseId === releaseId) {
|
|
419
427
|
queryClient.setQueryData(queryKey, data);
|
|
420
428
|
} else if (releaseId && !dataReleaseId) {
|
|
421
|
-
void queryClient.invalidateQueries(
|
|
429
|
+
void queryClient.invalidateQueries({
|
|
430
|
+
queryKey
|
|
431
|
+
});
|
|
422
432
|
}
|
|
423
433
|
});
|
|
424
434
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-reference",
|
|
3
|
-
"version": "7.0.9",
|
|
3
|
+
"version": "7.0.10-canary.9+7b499ace",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"publishConfig": {
|
|
70
70
|
"registry": "https://npm.pkg.github.com/"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "7b499acec7585b2e88b00fa6add5265d20a9abc1"
|
|
73
73
|
}
|