@graphitation/apollo-react-relay-duct-tape 1.0.31 → 1.1.1

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":11195,"mtime":1709816566975,"results":"26","hashOfConfig":"27"},{"size":1917,"mtime":1709816566975,"results":"28","hashOfConfig":"27"},{"size":690,"mtime":1709816566975,"results":"29","hashOfConfig":"27"},{"size":12265,"mtime":1709816566975,"results":"30","hashOfConfig":"27"},{"size":174,"mtime":1709816566975,"results":"31","hashOfConfig":"27"},{"size":37593,"mtime":1709816566975,"results":"32","hashOfConfig":"27"},{"size":1839,"mtime":1709816566975,"results":"33","hashOfConfig":"27"},{"size":1709,"mtime":1709816566979,"results":"34","hashOfConfig":"27"},{"size":3041,"mtime":1709816566979,"results":"35","hashOfConfig":"27"},{"size":445,"mtime":1709816566979,"results":"36","hashOfConfig":"27"},{"size":575,"mtime":1709816566979,"results":"37","hashOfConfig":"27"},{"size":3668,"mtime":1709816566979,"results":"38","hashOfConfig":"27"},{"size":3662,"mtime":1709816566979,"results":"39","hashOfConfig":"27"},{"size":10442,"mtime":1709816566979,"results":"40","hashOfConfig":"27"},{"size":5414,"mtime":1709816566979,"results":"41","hashOfConfig":"27"},{"size":843,"mtime":1709816566979,"results":"42","hashOfConfig":"27"},{"size":152,"mtime":1709816566979,"results":"43","hashOfConfig":"27"},{"size":286,"mtime":1709816566979,"results":"44","hashOfConfig":"27"},{"size":1243,"mtime":1709816566979,"results":"45","hashOfConfig":"27"},{"size":230,"mtime":1709816566979,"results":"46","hashOfConfig":"27"},{"size":2829,"mtime":1709816566979,"results":"47","hashOfConfig":"27"},{"size":2322,"mtime":1709816566979,"results":"48","hashOfConfig":"27"},{"size":1110,"mtime":1709816566979,"results":"49","hashOfConfig":"27"},{"size":2058,"mtime":1709816566979,"results":"50","hashOfConfig":"27"},{"size":1314,"mtime":1709816566979,"results":"51","hashOfConfig":"27"},{"filePath":"52","messages":"53","suppressedMessages":"54","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"qqqdtw",{"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":319,"column":38,"nodeType":"141","messageId":"142","endLine":319,"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":87,"column":28,"nodeType":"141","messageId":"142","endLine":87,"endColumn":31,"suggestions":"147","suppressions":"148"},{"ruleId":"139","severity":1,"message":"140","line":170,"column":24,"nodeType":"141","messageId":"142","endLine":170,"endColumn":27,"suggestions":"149","suppressions":"150"},{"ruleId":"139","severity":1,"message":"140","line":173,"column":4,"nodeType":"141","messageId":"142","endLine":173,"endColumn":7,"suggestions":"151","suppressions":"152"},{"ruleId":"139","severity":1,"message":"140","line":175,"column":30,"nodeType":"141","messageId":"142","endLine":175,"endColumn":33,"suggestions":"153","suppressions":"154"},{"ruleId":"139","severity":1,"message":"140","line":185,"column":24,"nodeType":"141","messageId":"142","endLine":185,"endColumn":27,"suggestions":"155","suppressions":"156"},{"ruleId":"139","severity":1,"message":"140","line":221,"column":9,"nodeType":"141","messageId":"142","endLine":221,"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"},[11682,11685],"unknown","never",[567,570],[2626,2629],[5796,5799],[5897,5900],[5997,6000],[6286,6289],[7350,7353],[1283,1286],[158,161],[276,279],[455,458]]
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":11195,"mtime":1711404127083,"results":"26","hashOfConfig":"27"},{"size":1917,"mtime":1711404127083,"results":"28","hashOfConfig":"27"},{"size":690,"mtime":1711404127083,"results":"29","hashOfConfig":"27"},{"size":12265,"mtime":1711404127083,"results":"30","hashOfConfig":"27"},{"size":174,"mtime":1711404127083,"results":"31","hashOfConfig":"27"},{"size":39560,"mtime":1711404127083,"results":"32","hashOfConfig":"27"},{"size":1839,"mtime":1711404127083,"results":"33","hashOfConfig":"27"},{"size":1709,"mtime":1711404127083,"results":"34","hashOfConfig":"27"},{"size":3041,"mtime":1711404127083,"results":"35","hashOfConfig":"27"},{"size":445,"mtime":1711404127083,"results":"36","hashOfConfig":"27"},{"size":575,"mtime":1711404127083,"results":"37","hashOfConfig":"27"},{"size":3668,"mtime":1711404127083,"results":"38","hashOfConfig":"27"},{"size":3851,"mtime":1711404127083,"results":"39","hashOfConfig":"27"},{"size":10442,"mtime":1711404127087,"results":"40","hashOfConfig":"27"},{"size":5414,"mtime":1711404127087,"results":"41","hashOfConfig":"27"},{"size":843,"mtime":1711404127087,"results":"42","hashOfConfig":"27"},{"size":152,"mtime":1711404127087,"results":"43","hashOfConfig":"27"},{"size":286,"mtime":1711404127087,"results":"44","hashOfConfig":"27"},{"size":1243,"mtime":1711404127087,"results":"45","hashOfConfig":"27"},{"size":230,"mtime":1711404127087,"results":"46","hashOfConfig":"27"},{"size":2829,"mtime":1711404127087,"results":"47","hashOfConfig":"27"},{"size":2325,"mtime":1711404127087,"results":"48","hashOfConfig":"27"},{"size":1110,"mtime":1711404127087,"results":"49","hashOfConfig":"27"},{"size":2069,"mtime":1711404127087,"results":"50","hashOfConfig":"27"},{"size":1314,"mtime":1711404127087,"results":"51","hashOfConfig":"27"},{"filePath":"52","messages":"53","suppressedMessages":"54","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"qqqdtw",{"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":319,"column":38,"nodeType":"141","messageId":"142","endLine":319,"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":170,"column":24,"nodeType":"141","messageId":"142","endLine":170,"endColumn":27,"suggestions":"149","suppressions":"150"},{"ruleId":"139","severity":1,"message":"140","line":173,"column":4,"nodeType":"141","messageId":"142","endLine":173,"endColumn":7,"suggestions":"151","suppressions":"152"},{"ruleId":"139","severity":1,"message":"140","line":175,"column":30,"nodeType":"141","messageId":"142","endLine":175,"endColumn":33,"suggestions":"153","suppressions":"154"},{"ruleId":"139","severity":1,"message":"140","line":185,"column":24,"nodeType":"141","messageId":"142","endLine":185,"endColumn":27,"suggestions":"155","suppressions":"156"},{"ruleId":"139","severity":1,"message":"140","line":221,"column":9,"nodeType":"141","messageId":"142","endLine":221,"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"},[11682,11685],"unknown","never",[567,570],[2790,2793],[5796,5799],[5897,5900],[5997,6000],[6286,6289],[7350,7353],[1283,1286],[158,161],[276,279],[455,458]]
package/CHANGELOG.md CHANGED
@@ -1,12 +1,29 @@
1
1
  # Change Log - @graphitation/apollo-react-relay-duct-tape
2
2
 
3
- This log was last generated on Thu, 07 Mar 2024 13:08:07 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 25 Mar 2024 22:06:53 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.1.1
8
+
9
+ Mon, 25 Mar 2024 22:06:53 GMT
10
+
11
+ ### Patches
12
+
13
+ - Using custom fetch-policy while lazyloading queries. (94519378+pasubhas@users.noreply.github.com)
14
+
15
+ ## 1.1.0
16
+
17
+ Mon, 25 Mar 2024 20:42:32 GMT
18
+
19
+ ### Minor changes
20
+
21
+ - align generated types with relay-compiler >=15.0.0 (dragoshomner@microsoft.com)
22
+ - Bump @graphitation/apollo-react-relay-duct-tape-compiler to v1.5.0
23
+
7
24
  ## 1.0.31
8
25
 
9
- Thu, 07 Mar 2024 13:08:07 GMT
26
+ Thu, 07 Mar 2024 13:08:30 GMT
10
27
 
11
28
  ### Patches
12
29
 
@@ -1,3 +1,4 @@
1
+ import type { WatchQueryFetchPolicy } from "@apollo/client";
1
2
  import type { CompiledArtefactModule } from "@graphitation/apollo-react-relay-duct-tape-compiler";
2
3
  /**
3
4
  * @todo Rewrite this to mimic Relay's preload APIs
@@ -9,6 +10,7 @@ import type { CompiledArtefactModule } from "@graphitation/apollo-react-relay-du
9
10
  */
10
11
  export declare function useCompiledLazyLoadQuery(documents: CompiledArtefactModule, options: {
11
12
  variables: Record<string, unknown>;
13
+ fetchPolicy?: WatchQueryFetchPolicy;
12
14
  }): {
13
15
  data?: Record<string, any>;
14
16
  error?: Error;
@@ -1 +1 @@
1
- {"version":3,"file":"useCompiledLazyLoadQuery.d.ts","sourceRoot":"","sources":["../../../src/storeObservation/compiledHooks/useCompiledLazyLoadQuery.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAiElG;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAE9C;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CA8B/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;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"}
@@ -70,7 +70,7 @@ class ExecutionQueryHandler {
70
70
  );
71
71
  }
72
72
  }
73
- function useExecutionQuery(client, executionQueryDocument, variables) {
73
+ function useExecutionQuery(client, executionQueryDocument, variables, fetchPolicy) {
74
74
  const forceUpdate = (0, import_useForceUpdate.useForceUpdate)();
75
75
  const execution = (0, import_react.useRef)(new ExecutionQueryHandler(() => forceUpdate()));
76
76
  (0, import_react.useEffect)(() => {
@@ -78,14 +78,15 @@ function useExecutionQuery(client, executionQueryDocument, variables) {
78
78
  execution.current.subscribe(
79
79
  client.watchQuery({
80
80
  query: executionQueryDocument,
81
- variables
81
+ variables,
82
+ fetchPolicy
82
83
  })
83
84
  );
84
85
  }
85
86
  return () => {
86
87
  execution.current.reset();
87
88
  };
88
- }, [executionQueryDocument, variables]);
89
+ }, [executionQueryDocument, variables, fetchPolicy]);
89
90
  return execution.current.status;
90
91
  }
91
92
  function useCompiledLazyLoadQuery(documents, options) {
@@ -104,7 +105,8 @@ function useCompiledLazyLoadQuery(documents, options) {
104
105
  const [loading, error] = useExecutionQuery(
105
106
  client,
106
107
  executionQueryDocument,
107
- variables
108
+ variables,
109
+ options.fetchPolicy
108
110
  );
109
111
  const { data } = (0, import_client.useQuery)(watchQueryDocument, {
110
112
  client,
@@ -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 { ObservableQuery, ApolloClient } 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): [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 }),\n );\n }\n return () => {\n execution.current.reset();\n };\n }, [executionQueryDocument, variables]);\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: { variables: Record<string, unknown> },\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 );\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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;AACtC,SAAO,UAAU,QAAQ;AAC3B;AAUO,SAAS,yBACd,WACA,SAE+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,EACF;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: [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;",
6
6
  "names": ["invariant", "useApolloQuery"]
7
7
  }
@@ -38,7 +38,7 @@ var ExecutionQueryHandler = class {
38
38
  );
39
39
  }
40
40
  };
41
- function useExecutionQuery(client, executionQueryDocument, variables) {
41
+ function useExecutionQuery(client, executionQueryDocument, variables, fetchPolicy) {
42
42
  const forceUpdate = useForceUpdate();
43
43
  const execution = useRef(new ExecutionQueryHandler(() => forceUpdate()));
44
44
  useEffect(() => {
@@ -46,14 +46,15 @@ function useExecutionQuery(client, executionQueryDocument, variables) {
46
46
  execution.current.subscribe(
47
47
  client.watchQuery({
48
48
  query: executionQueryDocument,
49
- variables
49
+ variables,
50
+ fetchPolicy
50
51
  })
51
52
  );
52
53
  }
53
54
  return () => {
54
55
  execution.current.reset();
55
56
  };
56
- }, [executionQueryDocument, variables]);
57
+ }, [executionQueryDocument, variables, fetchPolicy]);
57
58
  return execution.current.status;
58
59
  }
59
60
  function useCompiledLazyLoadQuery(documents, options) {
@@ -72,7 +73,8 @@ function useCompiledLazyLoadQuery(documents, options) {
72
73
  const [loading, error] = useExecutionQuery(
73
74
  client,
74
75
  executionQueryDocument,
75
- variables
76
+ variables,
77
+ options.fetchPolicy
76
78
  );
77
79
  const { data } = useApolloQuery(watchQueryDocument, {
78
80
  client,
@@ -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 { ObservableQuery, ApolloClient } 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): [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 }),\n );\n }\n return () => {\n execution.current.reset();\n };\n }, [executionQueryDocument, variables]);\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: { variables: Record<string, unknown> },\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 );\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;AAMlD,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;A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AAAA,IACA;AAAA,EACF;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: [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,CAA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AAC,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
  }
@@ -21,7 +21,7 @@
21
21
  */
22
22
  export declare function shallowCompareFragmentReferences<K extends string, ComparatorParam extends {
23
23
  [key in K]: {
24
- " $fragmentRefs": unknown;
24
+ " $fragmentSpreads": unknown;
25
25
  };
26
26
  }>(...fragmentReferenceProps: K[]): (prevProps: ComparatorParam, nextProps: ComparatorParam) => boolean;
27
27
  //# sourceMappingURL=shallowCompareFragmentReferences.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shallowCompareFragmentReferences.d.ts","sourceRoot":"","sources":["../../src/storeObservation/shallowCompareFragmentReferences.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gCAAgC,CAC9C,CAAC,SAAS,MAAM,EAChB,eAAe,SAAS;KAAG,GAAG,IAAI,CAAC,GAAG;QAAE,gBAAgB,EAAE,OAAO,CAAA;KAAE;CAAE,EAErE,GAAG,sBAAsB,EAAE,CAAC,EAAE,GAC7B,CAAC,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe,KAAK,OAAO,CA8BrE"}
1
+ {"version":3,"file":"shallowCompareFragmentReferences.d.ts","sourceRoot":"","sources":["../../src/storeObservation/shallowCompareFragmentReferences.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gCAAgC,CAC9C,CAAC,SAAS,MAAM,EAChB,eAAe,SAAS;KAAG,GAAG,IAAI,CAAC,GAAG;QAAE,mBAAmB,EAAE,OAAO,CAAA;KAAE;CAAE,EAExE,GAAG,sBAAsB,EAAE,CAAC,EAAE,GAC7B,CAAC,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe,KAAK,OAAO,CA8BrE"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/storeObservation/shallowCompareFragmentReferences.ts"],
4
- "sourcesContent": ["/**\n * Modified from https://github.com/facebook/react/blob/201af81b0168cabea3cc07cd8201378a4fec4aaf/packages/shared/shallowEqual.js\n * Copying is the suggested way, as mentioned here https://github.com/facebook/react/issues/16919\n */\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found at\n * https://github.com/facebook/react/blob/201af81b0168cabea3cc07cd8201378a4fec4aaf/LICENSE\n */\n\nimport invariant from \"invariant\";\n\n/**\n * A custom React.memo() comparator function factory that can be used with\n * components that use `useFragment` on a GraphQL type that implements the\n * `Node` interface, in which case only the `id` value needs to be equal to\n * avoid a re-render.\n *\n * @todo\n * Support arrays with fragment references\n *\n * @param fragmentReferenceProps\n * The props that refer to fragment references and should only be compared by\n * their [Node] ids.\n *\n * @returns\n * A comparator with parameters typed such that TS can verify the component\n * passed to React.memo() has props that match.\n */\nexport function shallowCompareFragmentReferences<\n K extends string,\n ComparatorParam extends { [key in K]: { \" $fragmentRefs\": unknown } },\n>(\n ...fragmentReferenceProps: K[]\n): (prevProps: ComparatorParam, nextProps: ComparatorParam) => boolean {\n return (prevProps, nextProps) => {\n if (Object.is(prevProps, nextProps)) {\n return true;\n }\n\n const keysPrev = Object.keys(prevProps);\n const keysNext = Object.keys(nextProps);\n\n if (keysPrev.length !== keysNext.length) {\n return false;\n }\n\n for (let i = 0; i < keysPrev.length; i++) {\n const checkKey = keysPrev[i] as K;\n if (\n !Object.prototype.hasOwnProperty.call(nextProps, checkKey) ||\n fragmentReferenceProps.includes(checkKey)\n ? !idsEqual(\n prevProps[checkKey] as { id?: unknown },\n nextProps[checkKey] as { id?: unknown },\n )\n : !Object.is(prevProps[checkKey], nextProps[checkKey])\n ) {\n return false;\n }\n }\n\n return true;\n };\n}\n\nfunction idsEqual(objA: { id?: unknown }, objB: { id?: unknown }) {\n invariant(\n objA.id && objB.id,\n \"Expected both fragment reference objects to have an id field\",\n );\n return objA.id === objB.id;\n}\n"],
4
+ "sourcesContent": ["/**\n * Modified from https://github.com/facebook/react/blob/201af81b0168cabea3cc07cd8201378a4fec4aaf/packages/shared/shallowEqual.js\n * Copying is the suggested way, as mentioned here https://github.com/facebook/react/issues/16919\n */\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found at\n * https://github.com/facebook/react/blob/201af81b0168cabea3cc07cd8201378a4fec4aaf/LICENSE\n */\n\nimport invariant from \"invariant\";\n\n/**\n * A custom React.memo() comparator function factory that can be used with\n * components that use `useFragment` on a GraphQL type that implements the\n * `Node` interface, in which case only the `id` value needs to be equal to\n * avoid a re-render.\n *\n * @todo\n * Support arrays with fragment references\n *\n * @param fragmentReferenceProps\n * The props that refer to fragment references and should only be compared by\n * their [Node] ids.\n *\n * @returns\n * A comparator with parameters typed such that TS can verify the component\n * passed to React.memo() has props that match.\n */\nexport function shallowCompareFragmentReferences<\n K extends string,\n ComparatorParam extends { [key in K]: { \" $fragmentSpreads\": unknown } },\n>(\n ...fragmentReferenceProps: K[]\n): (prevProps: ComparatorParam, nextProps: ComparatorParam) => boolean {\n return (prevProps, nextProps) => {\n if (Object.is(prevProps, nextProps)) {\n return true;\n }\n\n const keysPrev = Object.keys(prevProps);\n const keysNext = Object.keys(nextProps);\n\n if (keysPrev.length !== keysNext.length) {\n return false;\n }\n\n for (let i = 0; i < keysPrev.length; i++) {\n const checkKey = keysPrev[i] as K;\n if (\n !Object.prototype.hasOwnProperty.call(nextProps, checkKey) ||\n fragmentReferenceProps.includes(checkKey)\n ? !idsEqual(\n prevProps[checkKey] as { id?: unknown },\n nextProps[checkKey] as { id?: unknown },\n )\n : !Object.is(prevProps[checkKey], nextProps[checkKey])\n ) {\n return false;\n }\n }\n\n return true;\n };\n}\n\nfunction idsEqual(objA: { id?: unknown }, objB: { id?: unknown }) {\n invariant(\n objA.id && objB.id,\n \"Expected both fragment reference objects to have an id field\",\n );\n return objA.id === objB.id;\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA,uBAAsB;AAmBf,SAAS,oCAIX,wBACkE;AACrE,SAAO,CAAC,WAAW,cAAc;AAC/B,QAAI,OAAO,GAAG,WAAW,SAAS,GAAG;AACnC,aAAO;AAAA,IACT;AAEA,UAAM,WAAW,OAAO,KAAK,SAAS;AACtC,UAAM,WAAW,OAAO,KAAK,SAAS;AAEtC,QAAI,SAAS,WAAW,SAAS,QAAQ;AACvC,aAAO;AAAA,IACT;AAEA,aAAS,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;AACxC,YAAM,WAAW,SAAS,CAAC;AAC3B,UACE,CAAC,OAAO,UAAU,eAAe,KAAK,WAAW,QAAQ,KACzD,uBAAuB,SAAS,QAAQ,IACpC,CAAC;AAAA,QACC,UAAU,QAAQ;AAAA,QAClB,UAAU,QAAQ;AAAA,MACpB,IACA,CAAC,OAAO,GAAG,UAAU,QAAQ,GAAG,UAAU,QAAQ,CAAC,GACvD;AACA,eAAO;AAAA,MACT;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AACF;AAEA,SAAS,SAAS,MAAwB,MAAwB;AAChE,uBAAAA;AAAA,IACE,KAAK,MAAM,KAAK;AAAA,IAChB;AAAA,EACF;AACA,SAAO,KAAK,OAAO,KAAK;AAC1B;",
6
6
  "names": ["invariant"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/storeObservation/shallowCompareFragmentReferences.ts"],
4
- "sourcesContent": ["/**\n * Modified from https://github.com/facebook/react/blob/201af81b0168cabea3cc07cd8201378a4fec4aaf/packages/shared/shallowEqual.js\n * Copying is the suggested way, as mentioned here https://github.com/facebook/react/issues/16919\n */\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found at\n * https://github.com/facebook/react/blob/201af81b0168cabea3cc07cd8201378a4fec4aaf/LICENSE\n */\n\nimport invariant from \"invariant\";\n\n/**\n * A custom React.memo() comparator function factory that can be used with\n * components that use `useFragment` on a GraphQL type that implements the\n * `Node` interface, in which case only the `id` value needs to be equal to\n * avoid a re-render.\n *\n * @todo\n * Support arrays with fragment references\n *\n * @param fragmentReferenceProps\n * The props that refer to fragment references and should only be compared by\n * their [Node] ids.\n *\n * @returns\n * A comparator with parameters typed such that TS can verify the component\n * passed to React.memo() has props that match.\n */\nexport function shallowCompareFragmentReferences<\n K extends string,\n ComparatorParam extends { [key in K]: { \" $fragmentRefs\": unknown } },\n>(\n ...fragmentReferenceProps: K[]\n): (prevProps: ComparatorParam, nextProps: ComparatorParam) => boolean {\n return (prevProps, nextProps) => {\n if (Object.is(prevProps, nextProps)) {\n return true;\n }\n\n const keysPrev = Object.keys(prevProps);\n const keysNext = Object.keys(nextProps);\n\n if (keysPrev.length !== keysNext.length) {\n return false;\n }\n\n for (let i = 0; i < keysPrev.length; i++) {\n const checkKey = keysPrev[i] as K;\n if (\n !Object.prototype.hasOwnProperty.call(nextProps, checkKey) ||\n fragmentReferenceProps.includes(checkKey)\n ? !idsEqual(\n prevProps[checkKey] as { id?: unknown },\n nextProps[checkKey] as { id?: unknown },\n )\n : !Object.is(prevProps[checkKey], nextProps[checkKey])\n ) {\n return false;\n }\n }\n\n return true;\n };\n}\n\nfunction idsEqual(objA: { id?: unknown }, objB: { id?: unknown }) {\n invariant(\n objA.id && objB.id,\n \"Expected both fragment reference objects to have an id field\",\n );\n return objA.id === objB.id;\n}\n"],
4
+ "sourcesContent": ["/**\n * Modified from https://github.com/facebook/react/blob/201af81b0168cabea3cc07cd8201378a4fec4aaf/packages/shared/shallowEqual.js\n * Copying is the suggested way, as mentioned here https://github.com/facebook/react/issues/16919\n */\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found at\n * https://github.com/facebook/react/blob/201af81b0168cabea3cc07cd8201378a4fec4aaf/LICENSE\n */\n\nimport invariant from \"invariant\";\n\n/**\n * A custom React.memo() comparator function factory that can be used with\n * components that use `useFragment` on a GraphQL type that implements the\n * `Node` interface, in which case only the `id` value needs to be equal to\n * avoid a re-render.\n *\n * @todo\n * Support arrays with fragment references\n *\n * @param fragmentReferenceProps\n * The props that refer to fragment references and should only be compared by\n * their [Node] ids.\n *\n * @returns\n * A comparator with parameters typed such that TS can verify the component\n * passed to React.memo() has props that match.\n */\nexport function shallowCompareFragmentReferences<\n K extends string,\n ComparatorParam extends { [key in K]: { \" $fragmentSpreads\": unknown } },\n>(\n ...fragmentReferenceProps: K[]\n): (prevProps: ComparatorParam, nextProps: ComparatorParam) => boolean {\n return (prevProps, nextProps) => {\n if (Object.is(prevProps, nextProps)) {\n return true;\n }\n\n const keysPrev = Object.keys(prevProps);\n const keysNext = Object.keys(nextProps);\n\n if (keysPrev.length !== keysNext.length) {\n return false;\n }\n\n for (let i = 0; i < keysPrev.length; i++) {\n const checkKey = keysPrev[i] as K;\n if (\n !Object.prototype.hasOwnProperty.call(nextProps, checkKey) ||\n fragmentReferenceProps.includes(checkKey)\n ? !idsEqual(\n prevProps[checkKey] as { id?: unknown },\n nextProps[checkKey] as { id?: unknown },\n )\n : !Object.is(prevProps[checkKey], nextProps[checkKey])\n ) {\n return false;\n }\n }\n\n return true;\n };\n}\n\nfunction idsEqual(objA: { id?: unknown }, objB: { id?: unknown }) {\n invariant(\n objA.id && objB.id,\n \"Expected both fragment reference objects to have an id field\",\n );\n return objA.id === objB.id;\n}\n"],
5
5
  "mappings": ";AAYA,OAAO,eAAe;AAmBf,SAAS,oCAIX,wBACkE;AACrE,SAAO,CAAC,WAAW,cAAc;AAC/B,QAAI,OAAO,GAAG,WAAW,SAAS,GAAG;AACnC,aAAO;AAAA,IACT;AAEA,UAAM,WAAW,OAAO,KAAK,SAAS;AACtC,UAAM,WAAW,OAAO,KAAK,SAAS;AAEtC,QAAI,SAAS,WAAW,SAAS,QAAQ;AACvC,aAAO;AAAA,IACT;AAEA,aAAS,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;AACxC,YAAM,WAAW,SAAS,CAAC;AAC3B,UACE,CAAC,OAAO,UAAU,eAAe,KAAK,WAAW,QAAQ,KACzD,uBAAuB,SAAS,QAAQ,IACpC,CAAC;AAAA,QACC,UAAU,QAAQ;AAAA,QAClB,UAAU,QAAQ;AAAA,MACpB,IACA,CAAC,OAAO,GAAG,UAAU,QAAQ,GAAG,UAAU,QAAQ,CAAC,GACvD;AACA,eAAO;AAAA,MACT;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AACF;AAEA,SAAS,SAAS,MAAwB,MAAwB;AAChE;AAAA,IACE,KAAK,MAAM,KAAK;AAAA,IAChB;AAAA,EACF;AACA,SAAO,KAAK,OAAO,KAAK;AAC1B;",
6
6
  "names": []
7
7
  }
package/lib/types.d.ts CHANGED
@@ -27,10 +27,10 @@ export type FetchPolicy = "store-or-network" | "store-and-network" | "network-on
27
27
  * relay-compiler-language-typescript support for fragment references
28
28
  */
29
29
  export interface _RefType<Ref extends string> {
30
- " $refType": Ref;
30
+ " $fragmentType": Ref;
31
31
  }
32
32
  export interface _FragmentRefs<Refs extends string> {
33
- " $fragmentRefs": FragmentRefs<Refs>;
33
+ " $fragmentSpreads": FragmentRefs<Refs>;
34
34
  }
35
35
  export type FragmentRefs<Refs extends string> = {
36
36
  [ref in Refs]: true;
@@ -42,7 +42,7 @@ export type FragmentRef<Fragment> = Fragment extends _RefType<infer U> ? _Fragme
42
42
  export type FragmentReference = unknown;
43
43
  export type KeyType<TData = unknown> = Readonly<{
44
44
  " $data"?: TData;
45
- " $fragmentRefs": FragmentReference;
45
+ " $fragmentSpreads": FragmentReference;
46
46
  }>;
47
47
  export type KeyTypeData<TKey extends KeyType<TData>, TData = unknown> = Required<TKey>[" $data"];
48
48
  export type ArrayKeyType<TData = unknown> = ReadonlyArray<KeyType<ReadonlyArray<TData>> | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,SAAS;IAExB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC;CACrB;AAED,MAAM,WAAW,OAAO;IAEtB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,MAAM,iBAAiB,GACzB;IACE,OAAO,EAAE,mBAAmB,CAAC;CAC9B,GACD,CAAC,YAAY,GAAG;IACd,kBAAkB,CAAC,EAAE,KAAK,CAAC;IAC3B,sBAAsB,CAAC,EAAE,YAAY,CAAC;IACtC,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB,CAAC,GACF;IACE,kBAAkB,EAAE,YAAY,CAAC;IACjC,sBAAsB,CAAC,EAAE,YAAY,CAAC;IACtC,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB,CAAC;AAEN,MAAM,MAAM,WAAW,GACnB,kBAAkB,GAClB,mBAAmB,GACnB,cAAc,GACd,YAAY,CAAC;AAEjB;;GAEG;AAEH,MAAM,WAAW,QAAQ,CAAC,GAAG,SAAS,MAAM;IAC1C,WAAW,EAAE,GAAG,CAAC;CAClB;AAED,MAAM,WAAW,aAAa,CAAC,IAAI,SAAS,MAAM;IAChD,gBAAgB,EAAE,YAAY,CAAC,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BAAmB,EAAE,iBAAiB,CAAC;CACxC,CAAC,CAAC;AAEH,MAAM,MAAM,WAAW,CACrB,IAAI,SAAS,OAAO,CAAC,KAAK,CAAC,EAC3B,KAAK,GAAG,OAAO,IACb,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;AAE7B,MAAM,MAAM,YAAY,CAAC,KAAK,GAAG,OAAO,IAAI,aAAa,CAAC,OAAO,CAC/D,aAAa,CAAC,KAAK,CAAC,CACrB,GAAG,IAAI,CAAC,CAAC;AACV,MAAM,MAAM,gBAAgB,CAC1B,IAAI,SAAS,YAAY,CAAC,KAAK,CAAC,EAChC,KAAK,GAAG,OAAO,IACb,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC"}
package/lib/types.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/types.ts"],
4
- "sourcesContent": ["import type { DocumentNode } from \"graphql\";\n\nexport interface Variables {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [name: string]: any;\n}\n\nexport interface Context {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [name: string]: any;\n}\n\nexport interface OperationType {\n readonly variables: Variables;\n readonly context?: Context;\n readonly response: unknown;\n readonly rawResponse?: unknown;\n}\n\nexport type GraphQLTaggedNode =\n | {\n __brand: \"GraphQLTaggedNode\";\n }\n | (DocumentNode & {\n watchQueryDocument?: never;\n executionQueryDocument?: DocumentNode;\n __brand?: never;\n })\n | {\n watchQueryDocument: DocumentNode;\n executionQueryDocument?: DocumentNode;\n __brand?: never;\n };\n\nexport type FetchPolicy =\n | \"store-or-network\"\n | \"store-and-network\"\n | \"network-only\"\n | \"store-only\";\n\n/**\n * relay-compiler-language-typescript support for fragment references\n */\n\nexport interface _RefType<Ref extends string> {\n \" $refType\": Ref;\n}\n\nexport interface _FragmentRefs<Refs extends string> {\n \" $fragmentRefs\": FragmentRefs<Refs>;\n}\n\n// This is used in the actual artifacts to define the various fragment references a container holds.\nexport type FragmentRefs<Refs extends string> = {\n [ref in Refs]: true;\n};\n\n// This is a utility type for converting from a data type to a fragment reference that will resolve to that data type.\nexport type FragmentRef<Fragment> = Fragment extends _RefType<infer U>\n ? _FragmentRefs<U>\n : never;\n\n/**\n * react-relay DT\n */\n\nexport type FragmentReference = unknown;\n\nexport type KeyType<TData = unknown> = Readonly<{\n \" $data\"?: TData;\n \" $fragmentRefs\": FragmentReference;\n}>;\n\nexport type KeyTypeData<\n TKey extends KeyType<TData>,\n TData = unknown,\n> = Required<TKey>[\" $data\"];\n\nexport type ArrayKeyType<TData = unknown> = ReadonlyArray<KeyType<\n ReadonlyArray<TData>\n> | null>;\nexport type ArrayKeyTypeData<\n TKey extends ArrayKeyType<TData>,\n TData = unknown,\n> = KeyTypeData<NonNullable<TKey[number]>>;\n"],
4
+ "sourcesContent": ["import type { DocumentNode } from \"graphql\";\n\nexport interface Variables {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [name: string]: any;\n}\n\nexport interface Context {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [name: string]: any;\n}\n\nexport interface OperationType {\n readonly variables: Variables;\n readonly context?: Context;\n readonly response: unknown;\n readonly rawResponse?: unknown;\n}\n\nexport type GraphQLTaggedNode =\n | {\n __brand: \"GraphQLTaggedNode\";\n }\n | (DocumentNode & {\n watchQueryDocument?: never;\n executionQueryDocument?: DocumentNode;\n __brand?: never;\n })\n | {\n watchQueryDocument: DocumentNode;\n executionQueryDocument?: DocumentNode;\n __brand?: never;\n };\n\nexport type FetchPolicy =\n | \"store-or-network\"\n | \"store-and-network\"\n | \"network-only\"\n | \"store-only\";\n\n/**\n * relay-compiler-language-typescript support for fragment references\n */\n\nexport interface _RefType<Ref extends string> {\n \" $fragmentType\": Ref;\n}\n\nexport interface _FragmentRefs<Refs extends string> {\n \" $fragmentSpreads\": FragmentRefs<Refs>;\n}\n\n// This is used in the actual artifacts to define the various fragment references a container holds.\nexport type FragmentRefs<Refs extends string> = {\n [ref in Refs]: true;\n};\n\n// This is a utility type for converting from a data type to a fragment reference that will resolve to that data type.\nexport type FragmentRef<Fragment> = Fragment extends _RefType<infer U>\n ? _FragmentRefs<U>\n : never;\n\n/**\n * react-relay DT\n */\n\nexport type FragmentReference = unknown;\n\nexport type KeyType<TData = unknown> = Readonly<{\n \" $data\"?: TData;\n \" $fragmentSpreads\": FragmentReference;\n}>;\n\nexport type KeyTypeData<\n TKey extends KeyType<TData>,\n TData = unknown,\n> = Required<TKey>[\" $data\"];\n\nexport type ArrayKeyType<TData = unknown> = ReadonlyArray<KeyType<\n ReadonlyArray<TData>\n> | null>;\nexport type ArrayKeyTypeData<\n TKey extends ArrayKeyType<TData>,\n TData = unknown,\n> = KeyTypeData<NonNullable<TKey[number]>>;\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
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.0.31",
5
+ "version": "1.1.1",
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": "^17.0.2",
33
- "@graphitation/apollo-react-relay-duct-tape-compiler": "^1.4.1",
33
+ "@graphitation/apollo-react-relay-duct-tape-compiler": "^1.5.0",
34
34
  "ts-expect": "^1.3.0"
35
35
  },
36
36
  "peerDependencies": {