@isograph/react 0.0.0-main-cee47c78 → 0.0.0-main-684823b0

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.
@@ -1,4 +1,4 @@
1
- import { ItemCleanupPair } from '@isograph/isograph-disposable-types';
1
+ import { ItemCleanupPair } from '@isograph/disposable-types';
2
2
  import { FragmentReference } from '../FragmentReference';
3
3
  import { DataId } from '../IsographEnvironment';
4
4
  export declare function useClientSideDefer<TValue>([id, loader]: [
package/dist/reader.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { ItemCleanupPair } from '@isograph/disposable-types';
2
3
  import { FragmentReference } from './FragmentReference';
3
4
  import { ComponentOrFieldName, DataId, IsographEnvironment } from './IsographEnvironment';
4
5
  import { RefetchQueryNormalizationArtifact } from './entrypoint';
@@ -55,4 +56,7 @@ export type ReaderImperativelyLoadedField = {
55
56
  readonly refetchQuery: number;
56
57
  readonly name: string;
57
58
  };
58
- export type LoadableField<T> = [string, () => FragmentReference<any, T>];
59
+ export type LoadableField<T> = [
60
+ string,
61
+ () => ItemCleanupPair<FragmentReference<any, T>>
62
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isograph/react",
3
- "version": "0.0.0-main-cee47c78",
3
+ "version": "0.0.0-main-684823b0",
4
4
  "description": "Use Isograph with React",
5
5
  "homepage": "https://isograph.dev",
6
6
  "main": "dist/index.js",
@@ -16,8 +16,8 @@
16
16
  "prepack": "yarn run test && yarn run compile"
17
17
  },
18
18
  "dependencies": {
19
- "@isograph/disposable-types": "0.0.0-main-cee47c78",
20
- "@isograph/react-disposable-state": "0.0.0-main-cee47c78",
19
+ "@isograph/disposable-types": "0.0.0-main-684823b0",
20
+ "@isograph/react-disposable-state": "0.0.0-main-684823b0",
21
21
  "react": "^18.2.0"
22
22
  },
23
23
  "devDependencies": {
@@ -1,4 +1,4 @@
1
- import { ItemCleanupPair } from '@isograph/isograph-disposable-types';
1
+ import { ItemCleanupPair } from '@isograph/disposable-types';
2
2
  import { FragmentReference } from '../FragmentReference';
3
3
  import { useIsographEnvironment } from '../IsographEnvironmentProvider';
4
4
  import { getOrCreateCache } from '../cache';
@@ -9,7 +9,7 @@ import { DataId } from '../IsographEnvironment';
9
9
  export function useClientSideDefer<TValue>([id, loader]: [
10
10
  DataId,
11
11
  () => ItemCleanupPair<FragmentReference<any, TValue>>,
12
- ]) {
12
+ ]): FragmentReference<any, TValue> {
13
13
  const environment = useIsographEnvironment();
14
14
  const cache = getOrCreateCache(environment, id, loader);
15
15
 
package/src/reader.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ItemCleanupPair } from '@isograph/disposable-types';
1
2
  import { FragmentReference } from './FragmentReference';
2
3
  import {
3
4
  ComponentOrFieldName,
@@ -112,4 +113,7 @@ export type ReaderImperativelyLoadedField = {
112
113
  readonly name: string;
113
114
  };
114
115
 
115
- export type LoadableField<T> = [string, () => FragmentReference<any, T>];
116
+ export type LoadableField<T> = [
117
+ string,
118
+ () => ItemCleanupPair<FragmentReference<any, T>>,
119
+ ];