@graphitation/apollo-react-relay-duct-tape 1.3.20 → 1.3.22

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.
package/.eslintcache CHANGED
@@ -1 +1 @@
1
- [{"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/__tests__/hooks.test.tsx":"1","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/__tests__/useOverridenOrDefaultApolloClient.test.tsx":"2","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/convertFetchPolicy.ts":"3","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/hooks.ts":"4","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/index.ts":"5","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/compiledHooks.test.tsx":"6","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/fragmentReferencesFieldPolicy.test.ts":"7","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/getPossibleTypesAndDataIdFromNode.test.ts":"8","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/nodeFromCacheFieldPolicy.test.ts":"9","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/index.ts":"10","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/types.ts":"11","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledFragment.ts":"12","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledLazyLoadQuery.ts":"13","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledPaginationFragment.ts":"14","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledRefetchableFragment.ts":"15","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useDeepCompareMemoize.ts":"16","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useForceUpdate.ts":"17","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/fragmentReferencesFieldPolicy.ts":"18","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/getPossibleTypesAndDataIdFromNode.ts":"19","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/index.ts":"20","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/nodeFromCacheFieldPolicy.ts":"21","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/shallowCompareFragmentReferences.ts":"22","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/typePolicies.ts":"23","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/types.ts":"24","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/useOverridenOrDefaultApolloClient.ts":"25"},{"size":11649,"mtime":1739974042903,"results":"26","hashOfConfig":"27"},{"size":1922,"mtime":1739974042903,"results":"28","hashOfConfig":"27"},{"size":690,"mtime":1739974042903,"results":"29","hashOfConfig":"27"},{"size":12373,"mtime":1739974042903,"results":"30","hashOfConfig":"27"},{"size":174,"mtime":1739974042903,"results":"31","hashOfConfig":"27"},{"size":44317,"mtime":1739974042904,"results":"32","hashOfConfig":"27"},{"size":1839,"mtime":1739974042904,"results":"33","hashOfConfig":"27"},{"size":1709,"mtime":1739974042905,"results":"34","hashOfConfig":"27"},{"size":3041,"mtime":1739974042905,"results":"35","hashOfConfig":"27"},{"size":445,"mtime":1739974042905,"results":"36","hashOfConfig":"27"},{"size":575,"mtime":1739974042905,"results":"37","hashOfConfig":"27"},{"size":3668,"mtime":1739974042905,"results":"38","hashOfConfig":"27"},{"size":3851,"mtime":1739974042905,"results":"39","hashOfConfig":"27"},{"size":10521,"mtime":1739974042905,"results":"40","hashOfConfig":"27"},{"size":5467,"mtime":1739974042905,"results":"41","hashOfConfig":"27"},{"size":843,"mtime":1739974042905,"results":"42","hashOfConfig":"27"},{"size":152,"mtime":1739974042905,"results":"43","hashOfConfig":"27"},{"size":286,"mtime":1739974042905,"results":"44","hashOfConfig":"27"},{"size":1243,"mtime":1739974042905,"results":"45","hashOfConfig":"27"},{"size":230,"mtime":1739974042905,"results":"46","hashOfConfig":"27"},{"size":2829,"mtime":1739974042906,"results":"47","hashOfConfig":"27"},{"size":2325,"mtime":1739974042906,"results":"48","hashOfConfig":"27"},{"size":1110,"mtime":1739974042906,"results":"49","hashOfConfig":"27"},{"size":2069,"mtime":1739974042906,"results":"50","hashOfConfig":"27"},{"size":1352,"mtime":1739974042906,"results":"51","hashOfConfig":"27"},{"filePath":"52","messages":"53","suppressedMessages":"54","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"10b3r4m",{"filePath":"55","messages":"56","suppressedMessages":"57","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"58","messages":"59","suppressedMessages":"60","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"61","messages":"62","suppressedMessages":"63","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"64","messages":"65","suppressedMessages":"66","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"67","messages":"68","suppressedMessages":"69","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"70","messages":"71","suppressedMessages":"72","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"73","messages":"74","suppressedMessages":"75","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"76","messages":"77","suppressedMessages":"78","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"79","messages":"80","suppressedMessages":"81","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"82","messages":"83","suppressedMessages":"84","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"85","messages":"86","suppressedMessages":"87","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"88","messages":"89","suppressedMessages":"90","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"91","messages":"92","suppressedMessages":"93","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"94","messages":"95","suppressedMessages":"96","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"97","messages":"98","suppressedMessages":"99","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"100","messages":"101","suppressedMessages":"102","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"103","messages":"104","suppressedMessages":"105","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"106","messages":"107","suppressedMessages":"108","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"109","messages":"110","suppressedMessages":"111","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"112","messages":"113","suppressedMessages":"114","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"115","messages":"116","suppressedMessages":"117","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"118","messages":"119","suppressedMessages":"120","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"121","messages":"122","suppressedMessages":"123","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"124","messages":"125","suppressedMessages":"126","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/__tests__/hooks.test.tsx",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/__tests__/useOverridenOrDefaultApolloClient.test.tsx",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/convertFetchPolicy.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/hooks.ts",[],["127"],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/index.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/compiledHooks.test.tsx",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/fragmentReferencesFieldPolicy.test.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/getPossibleTypesAndDataIdFromNode.test.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/nodeFromCacheFieldPolicy.test.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/index.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/types.ts",[],["128"],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledFragment.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledLazyLoadQuery.ts",[],["129"],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledPaginationFragment.ts",[],["130","131","132","133","134"],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledRefetchableFragment.ts",[],["135"],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useDeepCompareMemoize.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useForceUpdate.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/fragmentReferencesFieldPolicy.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/getPossibleTypesAndDataIdFromNode.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/index.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/nodeFromCacheFieldPolicy.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/shallowCompareFragmentReferences.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/typePolicies.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/types.ts",[],["136","137"],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/useOverridenOrDefaultApolloClient.ts",[],["138"],{"ruleId":"139","severity":1,"message":"140","line":320,"column":38,"nodeType":"141","messageId":"142","endLine":320,"endColumn":41,"suggestions":"143","suppressions":"144"},{"ruleId":"139","severity":1,"message":"140","line":16,"column":32,"nodeType":"141","messageId":"142","endLine":16,"endColumn":35,"suggestions":"145","suppressions":"146"},{"ruleId":"139","severity":1,"message":"140","line":96,"column":28,"nodeType":"141","messageId":"142","endLine":96,"endColumn":31,"suggestions":"147","suppressions":"148"},{"ruleId":"139","severity":1,"message":"140","line":174,"column":24,"nodeType":"141","messageId":"142","endLine":174,"endColumn":27,"suggestions":"149","suppressions":"150"},{"ruleId":"139","severity":1,"message":"140","line":177,"column":4,"nodeType":"141","messageId":"142","endLine":177,"endColumn":7,"suggestions":"151","suppressions":"152"},{"ruleId":"139","severity":1,"message":"140","line":179,"column":30,"nodeType":"141","messageId":"142","endLine":179,"endColumn":33,"suggestions":"153","suppressions":"154"},{"ruleId":"139","severity":1,"message":"140","line":189,"column":24,"nodeType":"141","messageId":"142","endLine":189,"endColumn":27,"suggestions":"155","suppressions":"156"},{"ruleId":"139","severity":1,"message":"140","line":225,"column":9,"nodeType":"141","messageId":"142","endLine":225,"endColumn":12,"suggestions":"157","suppressions":"158"},{"ruleId":"139","severity":1,"message":"140","line":38,"column":26,"nodeType":"141","messageId":"142","endLine":38,"endColumn":29,"suggestions":"159","suppressions":"160"},{"ruleId":"139","severity":1,"message":"140","line":5,"column":19,"nodeType":"141","messageId":"142","endLine":5,"endColumn":22,"suggestions":"161","suppressions":"162"},{"ruleId":"139","severity":1,"message":"140","line":10,"column":19,"nodeType":"141","messageId":"142","endLine":10,"endColumn":22,"suggestions":"163","suppressions":"164"},{"ruleId":"139","severity":1,"message":"140","line":17,"column":51,"nodeType":"141","messageId":"142","endLine":17,"endColumn":54,"suggestions":"165","suppressions":"166"},"@typescript-eslint/no-explicit-any","Unexpected any. Specify a different type.","TSAnyKeyword","unexpectedAny",["167","168"],["169"],["170","171"],["172"],["173","174"],["175"],["176","177"],["178"],["179","180"],["181"],["182","183"],["184"],["185","186"],["187"],["188","189"],["190"],["191","192"],["193"],["194","195"],["196"],["197","198"],["199"],["200","201"],["202"],{"messageId":"203","fix":"204","desc":"205"},{"messageId":"206","fix":"207","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"211","desc":"205"},{"messageId":"206","fix":"212","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"213","desc":"205"},{"messageId":"206","fix":"214","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"215","desc":"205"},{"messageId":"206","fix":"216","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"217","desc":"205"},{"messageId":"206","fix":"218","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"219","desc":"205"},{"messageId":"206","fix":"220","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"221","desc":"205"},{"messageId":"206","fix":"222","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"223","desc":"205"},{"messageId":"206","fix":"224","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"225","desc":"205"},{"messageId":"206","fix":"226","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"227","desc":"205"},{"messageId":"206","fix":"228","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"229","desc":"205"},{"messageId":"206","fix":"230","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"231","desc":"205"},{"messageId":"206","fix":"232","desc":"208"},{"kind":"209","justification":"210"},"suggestUnknown",{"range":"233","text":"234"},"Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct.","suggestNever",{"range":"233","text":"235"},"Use `never` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.","directive","",{"range":"236","text":"234"},{"range":"236","text":"235"},{"range":"237","text":"234"},{"range":"237","text":"235"},{"range":"238","text":"234"},{"range":"238","text":"235"},{"range":"239","text":"234"},{"range":"239","text":"235"},{"range":"240","text":"234"},{"range":"240","text":"235"},{"range":"241","text":"234"},{"range":"241","text":"235"},{"range":"242","text":"234"},{"range":"242","text":"235"},{"range":"243","text":"234"},{"range":"243","text":"235"},{"range":"244","text":"234"},{"range":"244","text":"235"},{"range":"245","text":"234"},{"range":"245","text":"235"},{"range":"246","text":"234"},{"range":"246","text":"235"},[11748,11751],"unknown","never",[567,570],[2790,2793],[5868,5871],[5969,5972],[6069,6072],[6358,6361],[7422,7425],[1283,1286],[158,161],[276,279],[460,463]]
1
+ [{"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/__tests__/hooks.test.tsx":"1","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/__tests__/useOverridenOrDefaultApolloClient.test.tsx":"2","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/convertFetchPolicy.ts":"3","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/hooks.ts":"4","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/index.ts":"5","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/compiledHooks.test.tsx":"6","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/fragmentReferencesFieldPolicy.test.ts":"7","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/getPossibleTypesAndDataIdFromNode.test.ts":"8","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/nodeFromCacheFieldPolicy.test.ts":"9","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/index.ts":"10","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/types.ts":"11","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledFragment.ts":"12","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledLazyLoadQuery.ts":"13","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledPaginationFragment.ts":"14","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledRefetchableFragment.ts":"15","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useDeepCompareMemoize.ts":"16","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useForceUpdate.ts":"17","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/fragmentReferencesFieldPolicy.ts":"18","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/getPossibleTypesAndDataIdFromNode.ts":"19","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/index.ts":"20","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/nodeFromCacheFieldPolicy.ts":"21","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/shallowCompareFragmentReferences.ts":"22","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/typePolicies.ts":"23","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/types.ts":"24","/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/useOverridenOrDefaultApolloClient.ts":"25"},{"size":11649,"mtime":1742812096481,"results":"26","hashOfConfig":"27"},{"size":1922,"mtime":1742812096481,"results":"28","hashOfConfig":"27"},{"size":690,"mtime":1742812096481,"results":"29","hashOfConfig":"27"},{"size":12373,"mtime":1742812096481,"results":"30","hashOfConfig":"27"},{"size":174,"mtime":1742812096481,"results":"31","hashOfConfig":"27"},{"size":45749,"mtime":1742812096483,"results":"32","hashOfConfig":"27"},{"size":1839,"mtime":1742812096483,"results":"33","hashOfConfig":"27"},{"size":1709,"mtime":1742812096483,"results":"34","hashOfConfig":"27"},{"size":3041,"mtime":1742812096483,"results":"35","hashOfConfig":"27"},{"size":445,"mtime":1742812096483,"results":"36","hashOfConfig":"27"},{"size":575,"mtime":1742812096483,"results":"37","hashOfConfig":"27"},{"size":3668,"mtime":1742812096483,"results":"38","hashOfConfig":"27"},{"size":4126,"mtime":1742812096483,"results":"39","hashOfConfig":"27"},{"size":10521,"mtime":1742812096484,"results":"40","hashOfConfig":"27"},{"size":5467,"mtime":1742812096484,"results":"41","hashOfConfig":"27"},{"size":843,"mtime":1742812096484,"results":"42","hashOfConfig":"27"},{"size":152,"mtime":1742812096484,"results":"43","hashOfConfig":"27"},{"size":286,"mtime":1742812096484,"results":"44","hashOfConfig":"27"},{"size":1243,"mtime":1742812096484,"results":"45","hashOfConfig":"27"},{"size":230,"mtime":1742812096484,"results":"46","hashOfConfig":"27"},{"size":2829,"mtime":1742812096484,"results":"47","hashOfConfig":"27"},{"size":2325,"mtime":1742812096484,"results":"48","hashOfConfig":"27"},{"size":1110,"mtime":1742812096484,"results":"49","hashOfConfig":"27"},{"size":2069,"mtime":1742812096484,"results":"50","hashOfConfig":"27"},{"size":1352,"mtime":1742812096484,"results":"51","hashOfConfig":"27"},{"filePath":"52","messages":"53","suppressedMessages":"54","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"obk99i",{"filePath":"55","messages":"56","suppressedMessages":"57","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"58","messages":"59","suppressedMessages":"60","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"61","messages":"62","suppressedMessages":"63","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"64","messages":"65","suppressedMessages":"66","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"67","messages":"68","suppressedMessages":"69","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"70","messages":"71","suppressedMessages":"72","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"73","messages":"74","suppressedMessages":"75","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"76","messages":"77","suppressedMessages":"78","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"79","messages":"80","suppressedMessages":"81","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"82","messages":"83","suppressedMessages":"84","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"85","messages":"86","suppressedMessages":"87","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"88","messages":"89","suppressedMessages":"90","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"91","messages":"92","suppressedMessages":"93","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"94","messages":"95","suppressedMessages":"96","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"97","messages":"98","suppressedMessages":"99","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"100","messages":"101","suppressedMessages":"102","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"103","messages":"104","suppressedMessages":"105","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"106","messages":"107","suppressedMessages":"108","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"109","messages":"110","suppressedMessages":"111","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"112","messages":"113","suppressedMessages":"114","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"115","messages":"116","suppressedMessages":"117","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"118","messages":"119","suppressedMessages":"120","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"121","messages":"122","suppressedMessages":"123","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"124","messages":"125","suppressedMessages":"126","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/__tests__/hooks.test.tsx",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/__tests__/useOverridenOrDefaultApolloClient.test.tsx",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/convertFetchPolicy.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/hooks.ts",[],["127"],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/index.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/compiledHooks.test.tsx",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/fragmentReferencesFieldPolicy.test.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/getPossibleTypesAndDataIdFromNode.test.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/__tests__/nodeFromCacheFieldPolicy.test.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/index.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/types.ts",[],["128"],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledFragment.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledLazyLoadQuery.ts",[],["129"],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledPaginationFragment.ts",[],["130","131","132","133","134"],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useCompiledRefetchableFragment.ts",[],["135"],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useDeepCompareMemoize.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/compiledHooks/useForceUpdate.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/fragmentReferencesFieldPolicy.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/getPossibleTypesAndDataIdFromNode.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/index.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/nodeFromCacheFieldPolicy.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/shallowCompareFragmentReferences.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/storeObservation/typePolicies.ts",[],[],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/types.ts",[],["136","137"],"/mnt/vss/_work/1/s/packages/apollo-react-relay-duct-tape/src/useOverridenOrDefaultApolloClient.ts",[],["138"],{"ruleId":"139","severity":1,"message":"140","line":320,"column":38,"nodeType":"141","messageId":"142","endLine":320,"endColumn":41,"suggestions":"143","suppressions":"144"},{"ruleId":"139","severity":1,"message":"140","line":16,"column":32,"nodeType":"141","messageId":"142","endLine":16,"endColumn":35,"suggestions":"145","suppressions":"146"},{"ruleId":"139","severity":1,"message":"140","line":104,"column":28,"nodeType":"141","messageId":"142","endLine":104,"endColumn":31,"suggestions":"147","suppressions":"148"},{"ruleId":"139","severity":1,"message":"140","line":174,"column":24,"nodeType":"141","messageId":"142","endLine":174,"endColumn":27,"suggestions":"149","suppressions":"150"},{"ruleId":"139","severity":1,"message":"140","line":177,"column":4,"nodeType":"141","messageId":"142","endLine":177,"endColumn":7,"suggestions":"151","suppressions":"152"},{"ruleId":"139","severity":1,"message":"140","line":179,"column":30,"nodeType":"141","messageId":"142","endLine":179,"endColumn":33,"suggestions":"153","suppressions":"154"},{"ruleId":"139","severity":1,"message":"140","line":189,"column":24,"nodeType":"141","messageId":"142","endLine":189,"endColumn":27,"suggestions":"155","suppressions":"156"},{"ruleId":"139","severity":1,"message":"140","line":225,"column":9,"nodeType":"141","messageId":"142","endLine":225,"endColumn":12,"suggestions":"157","suppressions":"158"},{"ruleId":"139","severity":1,"message":"140","line":38,"column":26,"nodeType":"141","messageId":"142","endLine":38,"endColumn":29,"suggestions":"159","suppressions":"160"},{"ruleId":"139","severity":1,"message":"140","line":5,"column":19,"nodeType":"141","messageId":"142","endLine":5,"endColumn":22,"suggestions":"161","suppressions":"162"},{"ruleId":"139","severity":1,"message":"140","line":10,"column":19,"nodeType":"141","messageId":"142","endLine":10,"endColumn":22,"suggestions":"163","suppressions":"164"},{"ruleId":"139","severity":1,"message":"140","line":17,"column":51,"nodeType":"141","messageId":"142","endLine":17,"endColumn":54,"suggestions":"165","suppressions":"166"},"@typescript-eslint/no-explicit-any","Unexpected any. Specify a different type.","TSAnyKeyword","unexpectedAny",["167","168"],["169"],["170","171"],["172"],["173","174"],["175"],["176","177"],["178"],["179","180"],["181"],["182","183"],["184"],["185","186"],["187"],["188","189"],["190"],["191","192"],["193"],["194","195"],["196"],["197","198"],["199"],["200","201"],["202"],{"messageId":"203","fix":"204","desc":"205"},{"messageId":"206","fix":"207","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"211","desc":"205"},{"messageId":"206","fix":"212","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"213","desc":"205"},{"messageId":"206","fix":"214","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"215","desc":"205"},{"messageId":"206","fix":"216","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"217","desc":"205"},{"messageId":"206","fix":"218","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"219","desc":"205"},{"messageId":"206","fix":"220","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"221","desc":"205"},{"messageId":"206","fix":"222","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"223","desc":"205"},{"messageId":"206","fix":"224","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"225","desc":"205"},{"messageId":"206","fix":"226","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"227","desc":"205"},{"messageId":"206","fix":"228","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"229","desc":"205"},{"messageId":"206","fix":"230","desc":"208"},{"kind":"209","justification":"210"},{"messageId":"203","fix":"231","desc":"205"},{"messageId":"206","fix":"232","desc":"208"},{"kind":"209","justification":"210"},"suggestUnknown",{"range":"233","text":"234"},"Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct.","suggestNever",{"range":"233","text":"235"},"Use `never` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.","directive","",{"range":"236","text":"234"},{"range":"236","text":"235"},{"range":"237","text":"234"},{"range":"237","text":"235"},{"range":"238","text":"234"},{"range":"238","text":"235"},{"range":"239","text":"234"},{"range":"239","text":"235"},{"range":"240","text":"234"},{"range":"240","text":"235"},{"range":"241","text":"234"},{"range":"241","text":"235"},{"range":"242","text":"234"},{"range":"242","text":"235"},{"range":"243","text":"234"},{"range":"243","text":"235"},{"range":"244","text":"234"},{"range":"244","text":"235"},{"range":"245","text":"234"},{"range":"245","text":"235"},{"range":"246","text":"234"},{"range":"246","text":"235"},[11748,11751],"unknown","never",[567,570],[3065,3068],[5868,5871],[5969,5972],[6069,6072],[6358,6361],[7422,7425],[1283,1286],[158,161],[276,279],[460,463]]
package/CHANGELOG.md CHANGED
@@ -1,12 +1,28 @@
1
1
  # Change Log - @graphitation/apollo-react-relay-duct-tape
2
2
 
3
- <!-- This log was last generated on Wed, 19 Feb 2025 14:17:53 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Mon, 24 Mar 2025 10:38:19 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.3.22
8
+
9
+ Mon, 24 Mar 2025 10:38:19 GMT
10
+
11
+ ### Patches
12
+
13
+ - Bump @graphitation/apollo-react-relay-duct-tape-compiler to v1.6.19
14
+
15
+ ## 1.3.21
16
+
17
+ Fri, 21 Mar 2025 12:15:48 GMT
18
+
19
+ ### Patches
20
+
21
+ - do not unsubscribe when we are still in loading state (pavelglac@gmail.com)
22
+
7
23
  ## 1.3.20
8
24
 
9
- Wed, 19 Feb 2025 14:17:53 GMT
25
+ Wed, 19 Feb 2025 14:18:14 GMT
10
26
 
11
27
  ### Patches
12
28
 
@@ -1 +1 @@
1
- {"version":3,"file":"useCompiledLazyLoadQuery.d.ts","sourceRoot":"","sources":["../../../src/storeObservation/compiledHooks/useCompiledLazyLoadQuery.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAGV,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAmElG;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE;IACP,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE,qBAAqB,CAAC;CACrC,GAEA;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CA+B/C"}
1
+ {"version":3,"file":"useCompiledLazyLoadQuery.d.ts","sourceRoot":"","sources":["../../../src/storeObservation/compiledHooks/useCompiledLazyLoadQuery.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAGV,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AA2ElG;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE;IACP,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE,qBAAqB,CAAC;CACrC,GAEA;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CA+B/C"}
@@ -38,8 +38,8 @@ var import_useDeepCompareMemoize = require("./useDeepCompareMemoize");
38
38
  var import_useForceUpdate = require("./useForceUpdate");
39
39
  var import_useOverridenOrDefaultApolloClient = require("../../useOverridenOrDefaultApolloClient");
40
40
  class ExecutionQueryHandler {
41
- constructor(onComplete) {
42
- this.onComplete = onComplete;
41
+ constructor(onDataReceive) {
42
+ this.onDataReceive = onDataReceive;
43
43
  this.status = [true, void 0];
44
44
  }
45
45
  isIdle() {
@@ -54,15 +54,17 @@ class ExecutionQueryHandler {
54
54
  this.dispose();
55
55
  this.status = [true, void 0];
56
56
  }
57
- handleResult(error) {
57
+ handleResult(error, loading) {
58
58
  this.status = [false, error];
59
- this.dispose();
60
- this.onComplete();
59
+ if (!loading) {
60
+ this.dispose();
61
+ }
62
+ this.onDataReceive();
61
63
  }
62
64
  subscribe(observable) {
63
65
  this.querySubscription = observable.subscribe(
64
- ({ error: err }) => {
65
- this.handleResult(err);
66
+ ({ error: err, loading }) => {
67
+ this.handleResult(err, loading);
66
68
  },
67
69
  (err) => {
68
70
  this.handleResult(err);
@@ -102,7 +104,7 @@ function useCompiledLazyLoadQuery(documents, options) {
102
104
  );
103
105
  const client = (0, import_useOverridenOrDefaultApolloClient.useOverridenOrDefaultApolloClient)();
104
106
  const variables = (0, import_useDeepCompareMemoize.useDeepCompareMemoize)(options.variables);
105
- const [loading, error] = useExecutionQuery(
107
+ const [pending, error] = useExecutionQuery(
106
108
  client,
107
109
  executionQueryDocument,
108
110
  variables,
@@ -113,7 +115,7 @@ function useCompiledLazyLoadQuery(documents, options) {
113
115
  variables,
114
116
  fetchPolicy: "cache-only",
115
117
  // ...but only once finished loading.
116
- skip: loading || !!error
118
+ skip: pending || !!error
117
119
  });
118
120
  return { data, error };
119
121
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/storeObservation/compiledHooks/useCompiledLazyLoadQuery.ts"],
4
- "sourcesContent": ["import { useRef, useEffect } from \"react\";\nimport { useQuery as useApolloQuery } from \"@apollo/client\";\nimport invariant from \"invariant\";\nimport { useDeepCompareMemoize } from \"./useDeepCompareMemoize\";\nimport { useForceUpdate } from \"./useForceUpdate\";\nimport { useOverridenOrDefaultApolloClient } from \"../../useOverridenOrDefaultApolloClient\";\n\nimport type {\n ObservableQuery,\n ApolloClient,\n WatchQueryFetchPolicy,\n} from \"@apollo/client\";\nimport type { DocumentNode } from \"graphql\";\nimport type { CompiledArtefactModule } from \"@graphitation/apollo-react-relay-duct-tape-compiler\";\n\nclass ExecutionQueryHandler {\n public status: [loading: boolean, error?: Error];\n private querySubscription?: ZenObservable.Subscription;\n\n constructor(private onComplete: () => void) {\n this.status = [true, undefined];\n }\n\n public isIdle() {\n return this.status[0] && this.querySubscription === undefined;\n }\n\n public dispose() {\n this.querySubscription?.unsubscribe();\n this.querySubscription = undefined;\n }\n\n public reset() {\n this.dispose();\n this.status = [true, undefined];\n }\n\n private handleResult(error?: Error) {\n this.status = [false, error];\n this.dispose();\n this.onComplete();\n }\n\n public subscribe(observable: ObservableQuery) {\n this.querySubscription = observable.subscribe(\n ({ error: err }) => {\n this.handleResult(err);\n },\n (err) => {\n this.handleResult(err);\n },\n );\n }\n}\n\nfunction useExecutionQuery(\n client: ApolloClient<unknown>,\n executionQueryDocument: DocumentNode,\n variables: Record<string, unknown>,\n fetchPolicy: WatchQueryFetchPolicy | undefined,\n): [loading: boolean, error?: Error] {\n const forceUpdate = useForceUpdate();\n const execution = useRef(new ExecutionQueryHandler(() => forceUpdate()));\n useEffect(() => {\n if (execution.current.isIdle()) {\n execution.current.subscribe(\n client.watchQuery({\n query: executionQueryDocument,\n variables,\n fetchPolicy,\n }),\n );\n }\n return () => {\n execution.current.reset();\n };\n }, [executionQueryDocument, variables, fetchPolicy]);\n return execution.current.status;\n}\n\n/**\n * @todo Rewrite this to mimic Relay's preload APIs\n *\n * @param documents Compiled execute and watch query documents that are used to\n * setup a narrow observable for just the data selected by the\n * original fragment.\n * @param options An object containing a variables field.\n */\nexport function useCompiledLazyLoadQuery(\n documents: CompiledArtefactModule,\n options: {\n variables: Record<string, unknown>;\n fetchPolicy?: WatchQueryFetchPolicy;\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): { data?: Record<string, any>; error?: Error } {\n const { watchQueryDocument } = documents;\n invariant(\n watchQueryDocument,\n \"useLazyLoadQuery(): Expected a `watchQueryDocument` to have been \" +\n \"extracted. Did you forget to invoke the compiler?\",\n );\n const { executionQueryDocument } = documents;\n invariant(\n executionQueryDocument,\n \"useLazyLoadQuery(): Expected a `executionQueryDocument` to have been \" +\n \"extracted. Did you forget to invoke the compiler?\",\n );\n const client = useOverridenOrDefaultApolloClient();\n const variables = useDeepCompareMemoize(options.variables);\n // First fetch all data needed for the entire tree...\n const [loading, error] = useExecutionQuery(\n client,\n executionQueryDocument,\n variables,\n options.fetchPolicy,\n );\n // ...then fetch/watch data for only the calling component...\n const { data } = useApolloQuery(watchQueryDocument, {\n client,\n variables,\n fetchPolicy: \"cache-only\",\n // ...but only once finished loading.\n skip: loading || !!error,\n });\n return { data, error };\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkC;AAClC,oBAA2C;AAC3C,uBAAsB;AACtB,mCAAsC;AACtC,4BAA+B;AAC/B,+CAAkD;AAUlD,MAAM,sBAAsB;AAAA,EAI1B,YAAoB,YAAwB;AAAxB;AAClB,SAAK,SAAS,CAAC,MAAM,MAAS;AAAA,EAChC;AAAA,EAEO,SAAS;AACd,WAAO,KAAK,OAAO,CAAC,KAAK,KAAK,sBAAsB;AAAA,EACtD;AAAA,EAEO,UAAU;AA3BnB;AA4BI,eAAK,sBAAL,mBAAwB;AACxB,SAAK,oBAAoB;AAAA,EAC3B;AAAA,EAEO,QAAQ;AACb,SAAK,QAAQ;AACb,SAAK,SAAS,CAAC,MAAM,MAAS;AAAA,EAChC;AAAA,EAEQ,aAAa,OAAe;AAClC,SAAK,SAAS,CAAC,OAAO,KAAK;AAC3B,SAAK,QAAQ;AACb,SAAK,WAAW;AAAA,EAClB;AAAA,EAEO,UAAU,YAA6B;AAC5C,SAAK,oBAAoB,WAAW;AAAA,MAClC,CAAC,EAAE,OAAO,IAAI,MAAM;AAClB,aAAK,aAAa,GAAG;AAAA,MACvB;AAAA,MACA,CAAC,QAAQ;AACP,aAAK,aAAa,GAAG;AAAA,MACvB;AAAA,IACF;AAAA,EACF;AACF;AAEA,SAAS,kBACP,QACA,wBACA,WACA,aACmC;AACnC,QAAM,kBAAc,sCAAe;AACnC,QAAM,gBAAY,qBAAO,IAAI,sBAAsB,MAAM,YAAY,CAAC,CAAC;AACvE,8BAAU,MAAM;AACd,QAAI,UAAU,QAAQ,OAAO,GAAG;AAC9B,gBAAU,QAAQ;AAAA,QAChB,OAAO,WAAW;AAAA,UAChB,OAAO;AAAA,UACP;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AACA,WAAO,MAAM;AACX,gBAAU,QAAQ,MAAM;AAAA,IAC1B;AAAA,EACF,GAAG,CAAC,wBAAwB,WAAW,WAAW,CAAC;AACnD,SAAO,UAAU,QAAQ;AAC3B;AAUO,SAAS,yBACd,WACA,SAK+C;AAC/C,QAAM,EAAE,mBAAmB,IAAI;AAC/B,uBAAAA;AAAA,IACE;AAAA,IACA;AAAA,EAEF;AACA,QAAM,EAAE,uBAAuB,IAAI;AACnC,uBAAAA;AAAA,IACE;AAAA,IACA;AAAA,EAEF;AACA,QAAM,aAAS,4EAAkC;AACjD,QAAM,gBAAY,oDAAsB,QAAQ,SAAS;AAEzD,QAAM,CAAC,SAAS,KAAK,IAAI;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV;AAEA,QAAM,EAAE,KAAK,QAAI,cAAAC,UAAe,oBAAoB;AAAA,IAClD;AAAA,IACA;AAAA,IACA,aAAa;AAAA;AAAA,IAEb,MAAM,WAAW,CAAC,CAAC;AAAA,EACrB,CAAC;AACD,SAAO,EAAE,MAAM,MAAM;AACvB;",
4
+ "sourcesContent": ["import { useRef, useEffect } from \"react\";\nimport { useQuery as useApolloQuery } from \"@apollo/client\";\nimport invariant from \"invariant\";\nimport { useDeepCompareMemoize } from \"./useDeepCompareMemoize\";\nimport { useForceUpdate } from \"./useForceUpdate\";\nimport { useOverridenOrDefaultApolloClient } from \"../../useOverridenOrDefaultApolloClient\";\n\nimport type {\n ObservableQuery,\n ApolloClient,\n WatchQueryFetchPolicy,\n} from \"@apollo/client\";\nimport type { DocumentNode } from \"graphql\";\nimport type { CompiledArtefactModule } from \"@graphitation/apollo-react-relay-duct-tape-compiler\";\n\nclass ExecutionQueryHandler {\n public status: [pending: boolean, error?: Error];\n private querySubscription?: ZenObservable.Subscription;\n\n constructor(private onDataReceive: () => void) {\n this.status = [true, undefined];\n }\n\n public isIdle() {\n return this.status[0] && this.querySubscription === undefined;\n }\n\n public dispose() {\n this.querySubscription?.unsubscribe();\n this.querySubscription = undefined;\n }\n\n public reset() {\n this.dispose();\n this.status = [true, undefined];\n }\n\n private handleResult(error: Error | undefined, loading?: boolean) {\n this.status = [false, error];\n\n /**\n /* For cache-and-network, we return the result from the cache\n /* immediately, but we don't want to dispose of the observable\n /* until the network request completes.\n */\n if (!loading) {\n this.dispose();\n }\n this.onDataReceive();\n }\n\n public subscribe(observable: ObservableQuery) {\n this.querySubscription = observable.subscribe(\n ({ error: err, loading }) => {\n this.handleResult(err, loading);\n },\n (err) => {\n this.handleResult(err);\n },\n );\n }\n}\n\nfunction useExecutionQuery(\n client: ApolloClient<unknown>,\n executionQueryDocument: DocumentNode,\n variables: Record<string, unknown>,\n fetchPolicy: WatchQueryFetchPolicy | undefined,\n): [loading: boolean, error?: Error] {\n const forceUpdate = useForceUpdate();\n const execution = useRef(new ExecutionQueryHandler(() => forceUpdate()));\n useEffect(() => {\n if (execution.current.isIdle()) {\n execution.current.subscribe(\n client.watchQuery({\n query: executionQueryDocument,\n variables,\n fetchPolicy,\n }),\n );\n }\n return () => {\n execution.current.reset();\n };\n }, [executionQueryDocument, variables, fetchPolicy]);\n return execution.current.status;\n}\n\n/**\n * @todo Rewrite this to mimic Relay's preload APIs\n *\n * @param documents Compiled execute and watch query documents that are used to\n * setup a narrow observable for just the data selected by the\n * original fragment.\n * @param options An object containing a variables field.\n */\nexport function useCompiledLazyLoadQuery(\n documents: CompiledArtefactModule,\n options: {\n variables: Record<string, unknown>;\n fetchPolicy?: WatchQueryFetchPolicy;\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): { data?: Record<string, any>; error?: Error } {\n const { watchQueryDocument } = documents;\n invariant(\n watchQueryDocument,\n \"useLazyLoadQuery(): Expected a `watchQueryDocument` to have been \" +\n \"extracted. Did you forget to invoke the compiler?\",\n );\n const { executionQueryDocument } = documents;\n invariant(\n executionQueryDocument,\n \"useLazyLoadQuery(): Expected a `executionQueryDocument` to have been \" +\n \"extracted. Did you forget to invoke the compiler?\",\n );\n const client = useOverridenOrDefaultApolloClient();\n const variables = useDeepCompareMemoize(options.variables);\n // First fetch all data needed for the entire tree...\n const [pending, error] = useExecutionQuery(\n client,\n executionQueryDocument,\n variables,\n options.fetchPolicy,\n );\n // ...then fetch/watch data for only the calling component...\n const { data } = useApolloQuery(watchQueryDocument, {\n client,\n variables,\n fetchPolicy: \"cache-only\",\n // ...but only once finished loading.\n skip: pending || !!error,\n });\n return { data, error };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkC;AAClC,oBAA2C;AAC3C,uBAAsB;AACtB,mCAAsC;AACtC,4BAA+B;AAC/B,+CAAkD;AAUlD,MAAM,sBAAsB;AAAA,EAI1B,YAAoB,eAA2B;AAA3B;AAClB,SAAK,SAAS,CAAC,MAAM,MAAS;AAAA,EAChC;AAAA,EAEO,SAAS;AACd,WAAO,KAAK,OAAO,CAAC,KAAK,KAAK,sBAAsB;AAAA,EACtD;AAAA,EAEO,UAAU;AA3BnB;AA4BI,eAAK,sBAAL,mBAAwB;AACxB,SAAK,oBAAoB;AAAA,EAC3B;AAAA,EAEO,QAAQ;AACb,SAAK,QAAQ;AACb,SAAK,SAAS,CAAC,MAAM,MAAS;AAAA,EAChC;AAAA,EAEQ,aAAa,OAA0B,SAAmB;AAChE,SAAK,SAAS,CAAC,OAAO,KAAK;AAO3B,QAAI,CAAC,SAAS;AACZ,WAAK,QAAQ;AAAA,IACf;AACA,SAAK,cAAc;AAAA,EACrB;AAAA,EAEO,UAAU,YAA6B;AAC5C,SAAK,oBAAoB,WAAW;AAAA,MAClC,CAAC,EAAE,OAAO,KAAK,QAAQ,MAAM;AAC3B,aAAK,aAAa,KAAK,OAAO;AAAA,MAChC;AAAA,MACA,CAAC,QAAQ;AACP,aAAK,aAAa,GAAG;AAAA,MACvB;AAAA,IACF;AAAA,EACF;AACF;AAEA,SAAS,kBACP,QACA,wBACA,WACA,aACmC;AACnC,QAAM,kBAAc,sCAAe;AACnC,QAAM,gBAAY,qBAAO,IAAI,sBAAsB,MAAM,YAAY,CAAC,CAAC;AACvE,8BAAU,MAAM;AACd,QAAI,UAAU,QAAQ,OAAO,GAAG;AAC9B,gBAAU,QAAQ;AAAA,QAChB,OAAO,WAAW;AAAA,UAChB,OAAO;AAAA,UACP;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AACA,WAAO,MAAM;AACX,gBAAU,QAAQ,MAAM;AAAA,IAC1B;AAAA,EACF,GAAG,CAAC,wBAAwB,WAAW,WAAW,CAAC;AACnD,SAAO,UAAU,QAAQ;AAC3B;AAUO,SAAS,yBACd,WACA,SAK+C;AAC/C,QAAM,EAAE,mBAAmB,IAAI;AAC/B,uBAAAA;AAAA,IACE;AAAA,IACA;AAAA,EAEF;AACA,QAAM,EAAE,uBAAuB,IAAI;AACnC,uBAAAA;AAAA,IACE;AAAA,IACA;AAAA,EAEF;AACA,QAAM,aAAS,4EAAkC;AACjD,QAAM,gBAAY,oDAAsB,QAAQ,SAAS;AAEzD,QAAM,CAAC,SAAS,KAAK,IAAI;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV;AAEA,QAAM,EAAE,KAAK,QAAI,cAAAC,UAAe,oBAAoB;AAAA,IAClD;AAAA,IACA;AAAA,IACA,aAAa;AAAA;AAAA,IAEb,MAAM,WAAW,CAAC,CAAC;AAAA,EACrB,CAAC;AACD,SAAO,EAAE,MAAM,MAAM;AACvB;",
6
6
  "names": ["invariant", "useApolloQuery"]
7
7
  }
@@ -6,8 +6,8 @@ import { useDeepCompareMemoize } from "./useDeepCompareMemoize.mjs";
6
6
  import { useForceUpdate } from "./useForceUpdate.mjs";
7
7
  import { useOverridenOrDefaultApolloClient } from "../../useOverridenOrDefaultApolloClient.mjs";
8
8
  var ExecutionQueryHandler = class {
9
- constructor(onComplete) {
10
- this.onComplete = onComplete;
9
+ constructor(onDataReceive) {
10
+ this.onDataReceive = onDataReceive;
11
11
  this.status = [true, void 0];
12
12
  }
13
13
  isIdle() {
@@ -22,15 +22,17 @@ var ExecutionQueryHandler = class {
22
22
  this.dispose();
23
23
  this.status = [true, void 0];
24
24
  }
25
- handleResult(error) {
25
+ handleResult(error, loading) {
26
26
  this.status = [false, error];
27
- this.dispose();
28
- this.onComplete();
27
+ if (!loading) {
28
+ this.dispose();
29
+ }
30
+ this.onDataReceive();
29
31
  }
30
32
  subscribe(observable) {
31
33
  this.querySubscription = observable.subscribe(
32
- ({ error: err }) => {
33
- this.handleResult(err);
34
+ ({ error: err, loading }) => {
35
+ this.handleResult(err, loading);
34
36
  },
35
37
  (err) => {
36
38
  this.handleResult(err);
@@ -70,7 +72,7 @@ function useCompiledLazyLoadQuery(documents, options) {
70
72
  );
71
73
  const client = useOverridenOrDefaultApolloClient();
72
74
  const variables = useDeepCompareMemoize(options.variables);
73
- const [loading, error] = useExecutionQuery(
75
+ const [pending, error] = useExecutionQuery(
74
76
  client,
75
77
  executionQueryDocument,
76
78
  variables,
@@ -81,7 +83,7 @@ function useCompiledLazyLoadQuery(documents, options) {
81
83
  variables,
82
84
  fetchPolicy: "cache-only",
83
85
  // ...but only once finished loading.
84
- skip: loading || !!error
86
+ skip: pending || !!error
85
87
  });
86
88
  return { data, error };
87
89
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/storeObservation/compiledHooks/useCompiledLazyLoadQuery.ts"],
4
- "sourcesContent": ["import { useRef, useEffect } from \"react\";\nimport { useQuery as useApolloQuery } from \"@apollo/client\";\nimport invariant from \"invariant\";\nimport { useDeepCompareMemoize } from \"./useDeepCompareMemoize\";\nimport { useForceUpdate } from \"./useForceUpdate\";\nimport { useOverridenOrDefaultApolloClient } from \"../../useOverridenOrDefaultApolloClient\";\n\nimport type {\n ObservableQuery,\n ApolloClient,\n WatchQueryFetchPolicy,\n} from \"@apollo/client\";\nimport type { DocumentNode } from \"graphql\";\nimport type { CompiledArtefactModule } from \"@graphitation/apollo-react-relay-duct-tape-compiler\";\n\nclass ExecutionQueryHandler {\n public status: [loading: boolean, error?: Error];\n private querySubscription?: ZenObservable.Subscription;\n\n constructor(private onComplete: () => void) {\n this.status = [true, undefined];\n }\n\n public isIdle() {\n return this.status[0] && this.querySubscription === undefined;\n }\n\n public dispose() {\n this.querySubscription?.unsubscribe();\n this.querySubscription = undefined;\n }\n\n public reset() {\n this.dispose();\n this.status = [true, undefined];\n }\n\n private handleResult(error?: Error) {\n this.status = [false, error];\n this.dispose();\n this.onComplete();\n }\n\n public subscribe(observable: ObservableQuery) {\n this.querySubscription = observable.subscribe(\n ({ error: err }) => {\n this.handleResult(err);\n },\n (err) => {\n this.handleResult(err);\n },\n );\n }\n}\n\nfunction useExecutionQuery(\n client: ApolloClient<unknown>,\n executionQueryDocument: DocumentNode,\n variables: Record<string, unknown>,\n fetchPolicy: WatchQueryFetchPolicy | undefined,\n): [loading: boolean, error?: Error] {\n const forceUpdate = useForceUpdate();\n const execution = useRef(new ExecutionQueryHandler(() => forceUpdate()));\n useEffect(() => {\n if (execution.current.isIdle()) {\n execution.current.subscribe(\n client.watchQuery({\n query: executionQueryDocument,\n variables,\n fetchPolicy,\n }),\n );\n }\n return () => {\n execution.current.reset();\n };\n }, [executionQueryDocument, variables, fetchPolicy]);\n return execution.current.status;\n}\n\n/**\n * @todo Rewrite this to mimic Relay's preload APIs\n *\n * @param documents Compiled execute and watch query documents that are used to\n * setup a narrow observable for just the data selected by the\n * original fragment.\n * @param options An object containing a variables field.\n */\nexport function useCompiledLazyLoadQuery(\n documents: CompiledArtefactModule,\n options: {\n variables: Record<string, unknown>;\n fetchPolicy?: WatchQueryFetchPolicy;\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): { data?: Record<string, any>; error?: Error } {\n const { watchQueryDocument } = documents;\n invariant(\n watchQueryDocument,\n \"useLazyLoadQuery(): Expected a `watchQueryDocument` to have been \" +\n \"extracted. Did you forget to invoke the compiler?\",\n );\n const { executionQueryDocument } = documents;\n invariant(\n executionQueryDocument,\n \"useLazyLoadQuery(): Expected a `executionQueryDocument` to have been \" +\n \"extracted. Did you forget to invoke the compiler?\",\n );\n const client = useOverridenOrDefaultApolloClient();\n const variables = useDeepCompareMemoize(options.variables);\n // First fetch all data needed for the entire tree...\n const [loading, error] = useExecutionQuery(\n client,\n executionQueryDocument,\n variables,\n options.fetchPolicy,\n );\n // ...then fetch/watch data for only the calling component...\n const { data } = useApolloQuery(watchQueryDocument, {\n client,\n variables,\n fetchPolicy: \"cache-only\",\n // ...but only once finished loading.\n skip: loading || !!error,\n });\n return { data, error };\n}\n"],
5
- "mappings": ";AAAA,SAAS,QAAQ,iBAAiB;AAClC,SAAS,YAAY,sBAAsB;AAC3C,OAAO,eAAe;AACtB,SAAS,6BAA6B;AACtC,SAAS,sBAAsB;AAC/B,SAAS,yCAAyC;AAUlD,IAAM,wBAAN,MAA4B;AAAA,EAI1B,YAAoB,YAAwB;AAAxB;AAClB,SAAK,SAAS,CAAC,MAAM,MAAS;AAAA,EAChC;AAAA,EAEO,SAAS;AACd,WAAO,KAAK,OAAO,CAAC,KAAK,KAAK,sBAAsB;AAAA,EACtD;AAAA,EAEO,UAAU;AA3BnB;AA4BI,eAAK,sBAAL,mBAAwB;AACxB,SAAK,oBAAoB;AAAA,EAC3B;AAAA,EAEO,QAAQ;AACb,SAAK,QAAQ;AACb,SAAK,SAAS,CAAC,MAAM,MAAS;AAAA,EAChC;AAAA,EAEQ,aAAa,OAAe;AAClC,SAAK,SAAS,CAAC,OAAO,KAAK;AAC3B,SAAK,QAAQ;AACb,SAAK,WAAW;AAAA,EAClB;AAAA,EAEO,UAAU,YAA6B;AAC5C,SAAK,oBAAoB,WAAW;AAAA,MAClC,CAAC,EAAE,OAAO,IAAI,MAAM;AAClB,aAAK,aAAa,GAAG;AAAA,MACvB;AAAA,MACA,CAAC,QAAQ;AACP,aAAK,aAAa,GAAG;AAAA,MACvB;AAAA,IACF;AAAA,EACF;AACF;AAEA,SAAS,kBACP,QACA,wBACA,WACA,aACmC;AACnC,QAAM,cAAc,eAAe;AACnC,QAAM,YAAY,OAAO,IAAI,sBAAsB,MAAM,YAAY,CAAC,CAAC;AACvE,YAAU,MAAM;AACd,QAAI,UAAU,QAAQ,OAAO,GAAG;AAC9B,gBAAU,QAAQ;AAAA,QAChB,OAAO,WAAW;AAAA,UAChB,OAAO;AAAA,UACP;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AACA,WAAO,MAAM;AACX,gBAAU,QAAQ,MAAM;AAAA,IAC1B;AAAA,EACF,GAAG,CAAC,wBAAwB,WAAW,WAAW,CAAC;AACnD,SAAO,UAAU,QAAQ;AAC3B;AAUO,SAAS,yBACd,WACA,SAK+C;AAC/C,QAAM,EAAE,mBAAmB,IAAI;AAC/B;AAAA,IACE;AAAA,IACA;AAAA,EAEF;AACA,QAAM,EAAE,uBAAuB,IAAI;AACnC;AAAA,IACE;AAAA,IACA;AAAA,EAEF;AACA,QAAM,SAAS,kCAAkC;AACjD,QAAM,YAAY,sBAAsB,QAAQ,SAAS;AAEzD,QAAM,CAAC,SAAS,KAAK,IAAI;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV;AAEA,QAAM,EAAE,KAAK,IAAI,eAAe,oBAAoB;AAAA,IAClD;AAAA,IACA;AAAA,IACA,aAAa;AAAA;AAAA,IAEb,MAAM,WAAW,CAAC,CAAC;AAAA,EACrB,CAAC;AACD,SAAO,EAAE,MAAM,MAAM;AACvB;",
4
+ "sourcesContent": ["import { useRef, useEffect } from \"react\";\nimport { useQuery as useApolloQuery } from \"@apollo/client\";\nimport invariant from \"invariant\";\nimport { useDeepCompareMemoize } from \"./useDeepCompareMemoize\";\nimport { useForceUpdate } from \"./useForceUpdate\";\nimport { useOverridenOrDefaultApolloClient } from \"../../useOverridenOrDefaultApolloClient\";\n\nimport type {\n ObservableQuery,\n ApolloClient,\n WatchQueryFetchPolicy,\n} from \"@apollo/client\";\nimport type { DocumentNode } from \"graphql\";\nimport type { CompiledArtefactModule } from \"@graphitation/apollo-react-relay-duct-tape-compiler\";\n\nclass ExecutionQueryHandler {\n public status: [pending: boolean, error?: Error];\n private querySubscription?: ZenObservable.Subscription;\n\n constructor(private onDataReceive: () => void) {\n this.status = [true, undefined];\n }\n\n public isIdle() {\n return this.status[0] && this.querySubscription === undefined;\n }\n\n public dispose() {\n this.querySubscription?.unsubscribe();\n this.querySubscription = undefined;\n }\n\n public reset() {\n this.dispose();\n this.status = [true, undefined];\n }\n\n private handleResult(error: Error | undefined, loading?: boolean) {\n this.status = [false, error];\n\n /**\n /* For cache-and-network, we return the result from the cache\n /* immediately, but we don't want to dispose of the observable\n /* until the network request completes.\n */\n if (!loading) {\n this.dispose();\n }\n this.onDataReceive();\n }\n\n public subscribe(observable: ObservableQuery) {\n this.querySubscription = observable.subscribe(\n ({ error: err, loading }) => {\n this.handleResult(err, loading);\n },\n (err) => {\n this.handleResult(err);\n },\n );\n }\n}\n\nfunction useExecutionQuery(\n client: ApolloClient<unknown>,\n executionQueryDocument: DocumentNode,\n variables: Record<string, unknown>,\n fetchPolicy: WatchQueryFetchPolicy | undefined,\n): [loading: boolean, error?: Error] {\n const forceUpdate = useForceUpdate();\n const execution = useRef(new ExecutionQueryHandler(() => forceUpdate()));\n useEffect(() => {\n if (execution.current.isIdle()) {\n execution.current.subscribe(\n client.watchQuery({\n query: executionQueryDocument,\n variables,\n fetchPolicy,\n }),\n );\n }\n return () => {\n execution.current.reset();\n };\n }, [executionQueryDocument, variables, fetchPolicy]);\n return execution.current.status;\n}\n\n/**\n * @todo Rewrite this to mimic Relay's preload APIs\n *\n * @param documents Compiled execute and watch query documents that are used to\n * setup a narrow observable for just the data selected by the\n * original fragment.\n * @param options An object containing a variables field.\n */\nexport function useCompiledLazyLoadQuery(\n documents: CompiledArtefactModule,\n options: {\n variables: Record<string, unknown>;\n fetchPolicy?: WatchQueryFetchPolicy;\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): { data?: Record<string, any>; error?: Error } {\n const { watchQueryDocument } = documents;\n invariant(\n watchQueryDocument,\n \"useLazyLoadQuery(): Expected a `watchQueryDocument` to have been \" +\n \"extracted. Did you forget to invoke the compiler?\",\n );\n const { executionQueryDocument } = documents;\n invariant(\n executionQueryDocument,\n \"useLazyLoadQuery(): Expected a `executionQueryDocument` to have been \" +\n \"extracted. Did you forget to invoke the compiler?\",\n );\n const client = useOverridenOrDefaultApolloClient();\n const variables = useDeepCompareMemoize(options.variables);\n // First fetch all data needed for the entire tree...\n const [pending, error] = useExecutionQuery(\n client,\n executionQueryDocument,\n variables,\n options.fetchPolicy,\n );\n // ...then fetch/watch data for only the calling component...\n const { data } = useApolloQuery(watchQueryDocument, {\n client,\n variables,\n fetchPolicy: \"cache-only\",\n // ...but only once finished loading.\n skip: pending || !!error,\n });\n return { data, error };\n}\n"],
5
+ "mappings": ";AAAA,SAAS,QAAQ,iBAAiB;AAClC,SAAS,YAAY,sBAAsB;AAC3C,OAAO,eAAe;AACtB,SAAS,6BAA6B;AACtC,SAAS,sBAAsB;AAC/B,SAAS,yCAAyC;AAUlD,IAAM,wBAAN,MAA4B;AAAA,EAI1B,YAAoB,eAA2B;AAA3B;AAClB,SAAK,SAAS,CAAC,MAAM,MAAS;AAAA,EAChC;AAAA,EAEO,SAAS;AACd,WAAO,KAAK,OAAO,CAAC,KAAK,KAAK,sBAAsB;AAAA,EACtD;AAAA,EAEO,UAAU;AA3BnB;AA4BI,eAAK,sBAAL,mBAAwB;AACxB,SAAK,oBAAoB;AAAA,EAC3B;AAAA,EAEO,QAAQ;AACb,SAAK,QAAQ;AACb,SAAK,SAAS,CAAC,MAAM,MAAS;AAAA,EAChC;AAAA,EAEQ,aAAa,OAA0B,SAAmB;AAChE,SAAK,SAAS,CAAC,OAAO,KAAK;AAO3B,QAAI,CAAC,SAAS;AACZ,WAAK,QAAQ;AAAA,IACf;AACA,SAAK,cAAc;AAAA,EACrB;AAAA,EAEO,UAAU,YAA6B;AAC5C,SAAK,oBAAoB,WAAW;AAAA,MAClC,CAAC,EAAE,OAAO,KAAK,QAAQ,MAAM;AAC3B,aAAK,aAAa,KAAK,OAAO;AAAA,MAChC;AAAA,MACA,CAAC,QAAQ;AACP,aAAK,aAAa,GAAG;AAAA,MACvB;AAAA,IACF;AAAA,EACF;AACF;AAEA,SAAS,kBACP,QACA,wBACA,WACA,aACmC;AACnC,QAAM,cAAc,eAAe;AACnC,QAAM,YAAY,OAAO,IAAI,sBAAsB,MAAM,YAAY,CAAC,CAAC;AACvE,YAAU,MAAM;AACd,QAAI,UAAU,QAAQ,OAAO,GAAG;AAC9B,gBAAU,QAAQ;AAAA,QAChB,OAAO,WAAW;AAAA,UAChB,OAAO;AAAA,UACP;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AACA,WAAO,MAAM;AACX,gBAAU,QAAQ,MAAM;AAAA,IAC1B;AAAA,EACF,GAAG,CAAC,wBAAwB,WAAW,WAAW,CAAC;AACnD,SAAO,UAAU,QAAQ;AAC3B;AAUO,SAAS,yBACd,WACA,SAK+C;AAC/C,QAAM,EAAE,mBAAmB,IAAI;AAC/B;AAAA,IACE;AAAA,IACA;AAAA,EAEF;AACA,QAAM,EAAE,uBAAuB,IAAI;AACnC;AAAA,IACE;AAAA,IACA;AAAA,EAEF;AACA,QAAM,SAAS,kCAAkC;AACjD,QAAM,YAAY,sBAAsB,QAAQ,SAAS;AAEzD,QAAM,CAAC,SAAS,KAAK,IAAI;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACV;AAEA,QAAM,EAAE,KAAK,IAAI,eAAe,oBAAoB;AAAA,IAClD;AAAA,IACA;AAAA,IACA,aAAa;AAAA;AAAA,IAEb,MAAM,WAAW,CAAC,CAAC;AAAA,EACrB,CAAC;AACD,SAAO,EAAE,MAAM,MAAM;AACvB;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphitation/apollo-react-relay-duct-tape",
3
3
  "description": "A compatibility wrapper that provides the react-relay API on top of Apollo Client.",
4
4
  "license": "MIT",
5
- "version": "1.3.20",
5
+ "version": "1.3.22",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/microsoft/graphitation.git",
@@ -30,7 +30,7 @@
30
30
  "graphql": "^15.0.0",
31
31
  "monorepo-scripts": "*",
32
32
  "react": "^18.2.0",
33
- "@graphitation/apollo-react-relay-duct-tape-compiler": "^1.6.18",
33
+ "@graphitation/apollo-react-relay-duct-tape-compiler": "^1.6.19",
34
34
  "ts-expect": "^1.3.0"
35
35
  },
36
36
  "peerDependencies": {