Fix tasks (#5199)
## Query depth deprecation I'm deprecating depth parameter in our graphql query / cache tooling. They were obsolete since we introduce the possibility to provide RecordGqlFields ## Refactor combinedFindManyRecordHook The hook can now take an array of operationSignatures ## Fix tasks issues Fix optimistic rendering issue. Note that we still haven't handle optimisticEffect on creation properly
This commit is contained in:
@ -29,7 +29,7 @@ export const usePrefetchRunQuery = <T extends ObjectRecord>({
|
||||
const upsertRecordsInCache = (records: T[]) => {
|
||||
upsertFindManyRecordsQueryInCache({
|
||||
queryVariables: PREFETCH_CONFIG[prefetchKey].variables,
|
||||
depth: PREFETCH_CONFIG[prefetchKey].depth,
|
||||
recordGqlFields: PREFETCH_CONFIG[prefetchKey].fields,
|
||||
objectRecordsToOverwrite: records,
|
||||
computeReferences: false,
|
||||
});
|
||||
|
||||
@ -16,7 +16,8 @@ export const usePrefetchedData = <T extends ObjectRecord>(
|
||||
|
||||
const { records } = useFindManyRecords<T>({
|
||||
skip: !isDataPrefetched,
|
||||
...prefetchQueryKey,
|
||||
objectNameSingular: prefetchQueryKey.objectNameSingular,
|
||||
recordGqlFields: prefetchQueryKey.fields,
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user