Skip to content

Commit 1061976

Browse files
committed
meaty implementation...
1 parent b6271e0 commit 1061976

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

packages/data-connect/src/core/Cache.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ function isScalar(value: unknown): value is Scalar {
4949
}
5050

5151
/**
52-
* Internal utility type. Defines the shape of selection set for a table. It must have
53-
* __typename and __id for normalization.
52+
* Internal utility type. Defines the shape of selection set for a table.
53+
* If it includes __typename and __id, it can be normalized (and is considered a StubDataObject).
5454
*/
5555
interface SelectionSet {
5656
[field: string]: Scalar | Scalar[] | SelectionSet | SelectionSet[];
@@ -106,9 +106,14 @@ function isNormalizeable(
106106
/**
107107
* Interface for a stub result tree, with fields which are stub data objects.
108108
* @public
109+
* TODO:
109110
*/
110111
export interface StubResultTree {
111-
[key: string]: StubDataObject | StubDataObjectList;
112+
[key: string]:
113+
| SelectionSet
114+
| SelectionSet[]
115+
| StubDataObject
116+
| StubDataObjectList;
112117
}
113118

114119
/**

0 commit comments

Comments
 (0)