react-fate 1.3.2 → 1.3.3
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/docs/api/functions/FateClient.md +1 -1
- package/docs/api/functions/createClient.md +1 -1
- package/docs/api/functions/createGraphQLTransport.md +1 -1
- package/docs/api/functions/createTRPCTransport.md +1 -1
- package/docs/api/functions/graphqlMutation.md +1 -1
- package/docs/api/functions/mutation.md +1 -1
- package/docs/api/functions/useFateClient.md +2 -2
- package/docs/api/functions/useListView.md +1 -1
- package/docs/api/functions/useLiveListView.md +1 -1
- package/docs/api/functions/useLiveView.md +2 -2
- package/docs/api/functions/useRequest.md +2 -2
- package/docs/api/functions/useView.md +3 -3
- package/docs/api/type-aliases/ConnectionRef.md +1 -1
- package/docs/api/type-aliases/Deferred.md +1 -1
- package/docs/api/type-aliases/FateDehydratedState.md +1 -1
- package/docs/api/type-aliases/GraphQLMutationDefinition.md +1 -1
- package/docs/api/type-aliases/GraphQLMutationInput.md +1 -1
- package/docs/api/type-aliases/GraphQLMutationMap.md +1 -1
- package/docs/api/type-aliases/GraphQLMutationOutput.md +1 -1
- package/docs/api/type-aliases/GraphQLTransportOptions.md +11 -11
- package/docs/api/type-aliases/HydrateOptions.md +1 -1
- package/docs/api/type-aliases/HydrationLimits.md +1 -1
- package/docs/api/type-aliases/InferFateAPI.md +1 -1
- package/docs/api/type-aliases/Pagination.md +5 -5
- package/docs/api/type-aliases/ViewRef.md +1 -1
- package/lib/index.mjs +1 -0
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **FateClient**(`__namedParameters`): `Element`
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/react-fate/src/context.tsx:17](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [packages/react-fate/src/context.tsx:17](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/react-fate/src/context.tsx#L17)
|
|
6
6
|
|
|
7
7
|
Provider component that supplies a configured `FateClient` to React hooks.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **createTRPCTransport**\<`AppRouter`, `Mutations`\>(`__namedParameters`): `Transport`\<`MutationMapFromResolvers`\<`Mutations`\>\>
|
|
4
4
|
|
|
5
|
-
Defined in: packages/fate/lib/transport-
|
|
5
|
+
Defined in: packages/fate/lib/transport-DhaVVq4P.d.mts:1433
|
|
6
6
|
|
|
7
7
|
Builds a `Transport` backed by a tRPC client using the configured resolvers
|
|
8
8
|
for by-id queries, lists, and mutations.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **graphqlMutation**\<`T`, `Input`, `Output`\>(`entity`, `options`): [`GraphQLMutationDefinition`](../type-aliases/GraphQLMutationDefinition.md)\<`T`, `Input`, `Output`\>
|
|
4
4
|
|
|
5
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
5
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:58
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **mutation**\<`T`, `I`, `R`\>(`entity`): `MutationDefinition`\<`T`, `I`, `R`\>
|
|
4
4
|
|
|
5
|
-
Defined in: packages/fate/lib/transport-
|
|
5
|
+
Defined in: packages/fate/lib/transport-DhaVVq4P.d.mts:951
|
|
6
6
|
|
|
7
7
|
Defines a mutation for a given entity type, preserving the input and output
|
|
8
8
|
types for transports.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **useFateClient**\<`T`\>(): `FateClient`\<`T`\[`0`\], `T`\[`1`\]\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/react-fate/src/context.tsx:30](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [packages/react-fate/src/context.tsx:30](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/react-fate/src/context.tsx#L30)
|
|
6
6
|
|
|
7
7
|
Returns the nearest `FateClient` from context.
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ Returns the nearest `FateClient` from context.
|
|
|
10
10
|
|
|
11
11
|
### T
|
|
12
12
|
|
|
13
|
-
`T` *extends* \[\{ `categories`: `RootDefinition`\<`"Category"`, \
|
|
13
|
+
`T` *extends* \[\{ `categories`: `RootDefinition`\<`"Category"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `category`: `RootDefinition`\<`"Category"`, `Category`[]\>; `comment`: `RootDefinition`\<`"Comment"`, `Comment`[]\>; `commentSearch`: `RootDefinition`\<`"Comment"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\> & `ConnectionResult`\<`AnyRecord`\>\>; `event`: `RootDefinition`\<`"Event"`, `Event`[]\>; `eventAttendee`: `RootDefinition`\<`"EventAttendee"`, `EventAttendee`[]\>; `events`: `RootDefinition`\<`"Event"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `post`: `RootDefinition`\<`"Post"`, `Post`[]\>; `posts`: `RootDefinition`\<`"Post"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `tag`: `RootDefinition`\<`"Tag"`, `Tag`[]\>; `user`: `RootDefinition`\<`"User"`, `User`[]\>; `viewer`: `RootDefinition`\<`"User"`, `object` & `AnyRecord` \| `null`\>; \}, \{ `comment.add`: `MutationDefinition`\<`Comment`, \{ `content`: `string`; `postId`: `string`; \}, `object` & `ItemRecord` & `object` & `object`\>; `comment.delete`: `MutationDefinition`\<`Comment`, \{ `id`: `string`; \}, `object` & `ItemRecord` & `object` & `object`\>; `post.add`: `MutationDefinition`\<`Post`, \{ `content`: `string`; `title`: `string`; \}, `Post`\>; `post.like`: `MutationDefinition`\<`Post`, \{ `error?`: `"boundary"` \| `"callSite"`; `id`: `string`; `slow?`: `boolean`; \}, `Post`\>; `post.unlike`: `MutationDefinition`\<`Post`, \{ `id`: `string`; \}, `Post`\>; `user.update`: `MutationDefinition`\<`User`, \{ `name`: `string`; \}, `AnyRecord`\>; \}\] = \[\{ `categories`: `RootDefinition`\<`"Category"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `category`: `RootDefinition`\<`"Category"`, `Category`[]\>; `comment`: `RootDefinition`\<`"Comment"`, `Comment`[]\>; `commentSearch`: `RootDefinition`\<`"Comment"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\> & `ConnectionResult`\<`AnyRecord`\>\>; `event`: `RootDefinition`\<`"Event"`, `Event`[]\>; `eventAttendee`: `RootDefinition`\<`"EventAttendee"`, `EventAttendee`[]\>; `events`: `RootDefinition`\<`"Event"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `post`: `RootDefinition`\<`"Post"`, `Post`[]\>; `posts`: `RootDefinition`\<`"Post"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `tag`: `RootDefinition`\<`"Tag"`, `Tag`[]\>; `user`: `RootDefinition`\<`"User"`, `User`[]\>; `viewer`: `RootDefinition`\<`"User"`, `object` & `AnyRecord` \| `null`\>; \}, \{ `comment.add`: `MutationDefinition`\<`Comment`, \{ `content`: `string`; `postId`: `string`; \}, `object` & `ItemRecord` & `object` & `object`\>; `comment.delete`: `MutationDefinition`\<`Comment`, \{ `id`: `string`; \}, `object` & `ItemRecord` & `object` & `object`\>; `post.add`: `MutationDefinition`\<`Post`, \{ `content`: `string`; `title`: `string`; \}, `Post`\>; `post.like`: `MutationDefinition`\<`Post`, \{ `error?`: `"boundary"` \| `"callSite"`; `id`: `string`; `slow?`: `boolean`; \}, `Post`\>; `post.unlike`: `MutationDefinition`\<`Post`, \{ `id`: `string`; \}, `Post`\>; `user.update`: `MutationDefinition`\<`User`, \{ `name`: `string`; \}, `AnyRecord`\>; \}\]
|
|
14
14
|
|
|
15
15
|
## Returns
|
|
16
16
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **useListView**\<`C`\>(`selection`, `connection`): \[`ConnectionItems`\<`ResolvedConnection`\<`C`\>\>, `LoadMoreFn` \| `null`, `LoadMoreFn` \| `null`\]
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/react-fate/src/useListView.tsx:19](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [packages/react-fate/src/useListView.tsx:19](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/react-fate/src/useListView.tsx#L19)
|
|
6
6
|
|
|
7
7
|
Subscribes to a connection field, returning the current items and pagination
|
|
8
8
|
helpers to load the next or previous page.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **useLiveListView**\<`C`\>(`selection`, `connection`): \[`ConnectionItems`\<`ResolvedConnection`\<`C`\>\>, `LoadMoreFn` \| `null`, `LoadMoreFn` \| `null`\]
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/react-fate/src/useLiveListView.tsx:19](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [packages/react-fate/src/useLiveListView.tsx:19](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/react-fate/src/useLiveListView.tsx#L19)
|
|
6
6
|
|
|
7
7
|
Subscribes to a connection field, returning live-updating items and pagination
|
|
8
8
|
helpers to load the next or previous page.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **useLiveView**\<`V`, `R`\>(`view`, `ref`): `R` *extends* `null` ? `null` : `Readonly`\<`ViewSelection`\<`V`\> *extends* `Selection`\<`ViewEntityWithTypename`\<`V`\>\> ? `Mask`\<`ViewEntityWithTypename`\<`V`\>, \{ \[K in string \| number \| symbol as K extends "\_\_typename" ? never : K\]?: DeferrableSelectionFieldValue\<ViewEntityWithTypename\<V\>, K\> \} & `object` & `SelectionViewSpread`\<`ViewEntityWithTypename`\<`V`\>\> & `ViewSelection`\<`V`\>\> : `ViewEntityWithTypename`\<`V`\> & `object`\>
|
|
6
6
|
|
|
7
|
-
Defined in: [packages/react-fate/src/useLiveView.tsx:27](https://github.com/nkzw-tech/fate/blob/
|
|
7
|
+
Defined in: [packages/react-fate/src/useLiveView.tsx:27](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/react-fate/src/useLiveView.tsx#L27)
|
|
8
8
|
|
|
9
9
|
Resolves a reference against a view and subscribes to live server updates for
|
|
10
10
|
that selection.
|
|
@@ -43,7 +43,7 @@ const post = useLiveView(PostView, postRef);
|
|
|
43
43
|
|
|
44
44
|
> **useLiveView**\<`V`, `R`\>(`view`, `ref`): `R` *extends* `null` ? `null` : `Readonly`\<`ViewSelection`\<`V`\> *extends* `Selection`\<`ViewEntityWithTypename`\<`V`\>\> ? `Mask`\<`ViewEntityWithTypename`\<`V`\>, \{ \[K in string \| number \| symbol as K extends "\_\_typename" ? never : K\]?: DeferrableSelectionFieldValue\<ViewEntityWithTypename\<V\>, K\> \} & `object` & `SelectionViewSpread`\<`ViewEntityWithTypename`\<`V`\>\> & `ViewSelection`\<`V`\>\> : `ViewEntityWithTypename`\<`V`\> & `object`\>
|
|
45
45
|
|
|
46
|
-
Defined in: [packages/react-fate/src/useLiveView.tsx:31](https://github.com/nkzw-tech/fate/blob/
|
|
46
|
+
Defined in: [packages/react-fate/src/useLiveView.tsx:31](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/react-fate/src/useLiveView.tsx#L31)
|
|
47
47
|
|
|
48
48
|
Resolves a reference against a view and subscribes to live server updates for
|
|
49
49
|
that selection.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **useRequest**\<`R`, `O`\>(`request`, `options?`): `RequestResult`\<`O`, `R`\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/react-fate/src/useRequest.tsx:25](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [packages/react-fate/src/useRequest.tsx:25](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/react-fate/src/useRequest.tsx#L25)
|
|
6
6
|
|
|
7
7
|
Declares the data a screen needs and kicks off fetching, suspending while the
|
|
8
8
|
request resolves.
|
|
@@ -15,7 +15,7 @@ request resolves.
|
|
|
15
15
|
|
|
16
16
|
### O
|
|
17
17
|
|
|
18
|
-
`O` *extends* `FateRoots` = \{ `categories`: `RootDefinition`\<`"Category"`, \
|
|
18
|
+
`O` *extends* `FateRoots` = \{ `categories`: `RootDefinition`\<`"Category"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `category`: `RootDefinition`\<`"Category"`, `Category`[]\>; `comment`: `RootDefinition`\<`"Comment"`, `Comment`[]\>; `commentSearch`: `RootDefinition`\<`"Comment"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\> & `ConnectionResult`\<`AnyRecord`\>\>; `event`: `RootDefinition`\<`"Event"`, `Event`[]\>; `eventAttendee`: `RootDefinition`\<`"EventAttendee"`, `EventAttendee`[]\>; `events`: `RootDefinition`\<`"Event"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `post`: `RootDefinition`\<`"Post"`, `Post`[]\>; `posts`: `RootDefinition`\<`"Post"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `tag`: `RootDefinition`\<`"Tag"`, `Tag`[]\>; `user`: `RootDefinition`\<`"User"`, `User`[]\>; `viewer`: `RootDefinition`\<`"User"`, `object` & `AnyRecord` \| `null`\>; \}
|
|
19
19
|
|
|
20
20
|
## Parameters
|
|
21
21
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **useView**\<`V`, `R`\>(`view`, `ref`): `R` *extends* `null` ? `null` : `Readonly`\<`ViewSelection`\<`V`\> *extends* `Selection`\<`ViewEntityWithTypename`\<`V`\>\> ? `Mask`\<`ViewEntityWithTypename`\<`V`\>, \{ \[K in string \| number \| symbol as K extends "\_\_typename" ? never : K\]?: DeferrableSelectionFieldValue\<ViewEntityWithTypename\<V\>, K\> \} & `object` & `SelectionViewSpread`\<`ViewEntityWithTypename`\<`V`\>\> & `ViewSelection`\<`V`\>\> : `ViewEntityWithTypename`\<`V`\> & `object`\>
|
|
6
6
|
|
|
7
|
-
Defined in: [packages/react-fate/src/useView.tsx:40](https://github.com/nkzw-tech/fate/blob/
|
|
7
|
+
Defined in: [packages/react-fate/src/useView.tsx:40](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/react-fate/src/useView.tsx#L40)
|
|
8
8
|
|
|
9
9
|
Resolves a reference against a view and subscribes to updates for that selection.
|
|
10
10
|
|
|
@@ -42,7 +42,7 @@ const post = useView(PostView, postRef);
|
|
|
42
42
|
|
|
43
43
|
> **useView**\<`V`, `R`\>(`view`, `ref`): `R` *extends* `null` ? `null` : `Readonly`\<`ViewSelection`\<`V`\> *extends* `Selection`\<`ViewEntityWithTypename`\<`V`\>\> ? `Mask`\<`ViewEntityWithTypename`\<`V`\>, \{ \[K in string \| number \| symbol as K extends "\_\_typename" ? never : K\]?: DeferrableSelectionFieldValue\<ViewEntityWithTypename\<V\>, K\> \} & `object` & `SelectionViewSpread`\<`ViewEntityWithTypename`\<`V`\>\> & `ViewSelection`\<`V`\>\> : `ViewEntityWithTypename`\<`V`\> & `object`\>
|
|
44
44
|
|
|
45
|
-
Defined in: [packages/react-fate/src/useView.tsx:44](https://github.com/nkzw-tech/fate/blob/
|
|
45
|
+
Defined in: [packages/react-fate/src/useView.tsx:44](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/react-fate/src/useView.tsx#L44)
|
|
46
46
|
|
|
47
47
|
Resolves a reference against a view and subscribes to updates for that selection.
|
|
48
48
|
|
|
@@ -80,7 +80,7 @@ const post = useView(PostView, postRef);
|
|
|
80
80
|
|
|
81
81
|
> **useView**\<`V`\>(`view`, `ref`): `Readonly`\<`ViewSelection`\<`V`\> *extends* `Selection`\<`ViewEntityWithTypename`\<`V`\>\> ? `Mask`\<`ViewEntityWithTypename`\<`V`\>, \{ \[K in string \| number \| symbol as K extends "\_\_typename" ? never : K\]?: DeferrableSelectionFieldValue\<ViewEntityWithTypename\<V\>, K\> \} & `object` & `SelectionViewSpread`\<`ViewEntityWithTypename`\<`V`\>\> & `ViewSelection`\<`V`\>\> : `ViewEntityWithTypename`\<`V`\> & `object`\> \| `null`
|
|
82
82
|
|
|
83
|
-
Defined in: [packages/react-fate/src/useView.tsx:48](https://github.com/nkzw-tech/fate/blob/
|
|
83
|
+
Defined in: [packages/react-fate/src/useView.tsx:48](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/react-fate/src/useView.tsx#L48)
|
|
84
84
|
|
|
85
85
|
Resolves a reference against a view and subscribes to updates for that selection.
|
|
86
86
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **ConnectionRef**\<`TName`\> = `Readonly`\<\{ `items`: `ReadonlyArray`\<\{ `cursor?`: `string`; `node`: [`ViewRef`](ViewRef.md)\<`TName`\>; \}\>; `pagination?`: [`Pagination`](Pagination.md); \}\>
|
|
4
4
|
|
|
5
|
-
Defined in: packages/fate/lib/transport-
|
|
5
|
+
Defined in: packages/fate/lib/transport-DhaVVq4P.d.mts:1108
|
|
6
6
|
|
|
7
7
|
Ref for a connection, including pagination metadata.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Deferred**\<`T`\> = `Readonly`\<\{ `[DeferredTag]`: `DeferredMetadata`; \}\> & `object`
|
|
4
4
|
|
|
5
|
-
Defined in: packages/fate/lib/transport-
|
|
5
|
+
Defined in: packages/fate/lib/transport-DhaVVq4P.d.mts:1128
|
|
6
6
|
|
|
7
7
|
A deferred value returned from a masked view. Existing view hooks resolve it when read.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **FateDehydratedState**\<`Scope`\> = `Readonly`\<\{ `[hydrationScopeBrand]?`: `Scope`; `data`: `FateSerializedValue`; `scope`: `Scope`; `version`: `1`; \}\>
|
|
4
4
|
|
|
5
|
-
Defined in: packages/fate/lib/transport-
|
|
5
|
+
Defined in: packages/fate/lib/transport-DhaVVq4P.d.mts:685
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **GraphQLMutationDefinition**\<`T`, `Input`, `Output`\> = `Readonly`\<\{ `__fateGraphQLMutation?`: \{ `input`: `Input`; `output`: `Output`; \}; `entity`: `T`\[`"__typename"`\]; `field`: `string`; `inputArg?`: `false` \| `string`; \}\>
|
|
4
4
|
|
|
5
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
5
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:20
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **GraphQLMutationInput**\<`Definition`\> = `Definition` *extends* [`GraphQLMutationDefinition`](GraphQLMutationDefinition.md)\<`any`, infer Input, `any`\> ? `Input` : `never`
|
|
4
4
|
|
|
5
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
5
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:29
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **GraphQLMutationMap**\<`Mutations`\> = `Mutations` *extends* `Record`\<`string`, [`GraphQLMutationDefinition`](GraphQLMutationDefinition.md)\> ? `{ [K in keyof Mutations]: { input: GraphQLMutationInput<Mutations[K]>; output: GraphQLMutationOutput<Mutations[K]> } }` : `EmptyTransportMutations`
|
|
4
4
|
|
|
5
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
5
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:31
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **GraphQLMutationOutput**\<`Definition`\> = `Definition` *extends* [`GraphQLMutationDefinition`](GraphQLMutationDefinition.md)\<`any`, `any`, infer Output\> ? `Output` : `never`
|
|
4
4
|
|
|
5
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
5
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:30
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **GraphQLTransportOptions**\<`Mutations`\> = `object`
|
|
4
4
|
|
|
5
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
5
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:46
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:46
|
|
|
16
16
|
|
|
17
17
|
> `optional` **decodeNodeId?**: (`type`, `id`) => `string` \| `number`
|
|
18
18
|
|
|
19
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
19
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:47
|
|
20
20
|
|
|
21
21
|
#### Parameters
|
|
22
22
|
|
|
@@ -38,7 +38,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:47
|
|
|
38
38
|
|
|
39
39
|
> `optional` **encodeNodeId?**: (`type`, `id`) => `string` \| `number`
|
|
40
40
|
|
|
41
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
41
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:48
|
|
42
42
|
|
|
43
43
|
#### Parameters
|
|
44
44
|
|
|
@@ -60,7 +60,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:48
|
|
|
60
60
|
|
|
61
61
|
> `optional` **eventSource?**: `EventSourceConstructor`
|
|
62
62
|
|
|
63
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
63
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:49
|
|
64
64
|
|
|
65
65
|
***
|
|
66
66
|
|
|
@@ -68,7 +68,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:49
|
|
|
68
68
|
|
|
69
69
|
> `optional` **fetch?**: `FetchLike`
|
|
70
70
|
|
|
71
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
71
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:50
|
|
72
72
|
|
|
73
73
|
***
|
|
74
74
|
|
|
@@ -76,7 +76,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:50
|
|
|
76
76
|
|
|
77
77
|
> `optional` **headers?**: `HeadersFactory`
|
|
78
78
|
|
|
79
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
79
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:51
|
|
80
80
|
|
|
81
81
|
***
|
|
82
82
|
|
|
@@ -84,7 +84,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:51
|
|
|
84
84
|
|
|
85
85
|
> `optional` **live?**: `boolean` \| `GraphQLLiveOptions`
|
|
86
86
|
|
|
87
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
87
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:52
|
|
88
88
|
|
|
89
89
|
***
|
|
90
90
|
|
|
@@ -92,7 +92,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:52
|
|
|
92
92
|
|
|
93
93
|
> `optional` **mutations?**: `Record`\<`Extract`\<keyof `Mutations`, `string`\>, `GraphQLMutationRuntimeConfig`\>
|
|
94
94
|
|
|
95
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
95
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:53
|
|
96
96
|
|
|
97
97
|
***
|
|
98
98
|
|
|
@@ -100,7 +100,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:53
|
|
|
100
100
|
|
|
101
101
|
> `optional` **roots?**: `Record`\<`string`, `GraphQLRootConfig`\>
|
|
102
102
|
|
|
103
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
103
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:54
|
|
104
104
|
|
|
105
105
|
***
|
|
106
106
|
|
|
@@ -108,7 +108,7 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:54
|
|
|
108
108
|
|
|
109
109
|
> **types**: `ReadonlyArray`\<`Omit`\<`TypeConfig`, `"getId"`\> & `Partial`\<`Pick`\<`TypeConfig`, `"getId"`\>\>\>
|
|
110
110
|
|
|
111
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
111
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:55
|
|
112
112
|
|
|
113
113
|
***
|
|
114
114
|
|
|
@@ -116,4 +116,4 @@ Defined in: packages/fate/lib/graphqlTransport-B3cbhvJX.d.mts:55
|
|
|
116
116
|
|
|
117
117
|
> **url**: `string` \| `URL`
|
|
118
118
|
|
|
119
|
-
Defined in: packages/fate/lib/graphqlTransport-
|
|
119
|
+
Defined in: packages/fate/lib/graphqlTransport-DskuXeUP.d.mts:56
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
> **HydrateOptions** = `Readonly`\<\{ `merge?`: `"preserve-existing"` \| `"replace"`; \}\>
|
|
4
4
|
|
|
5
|
-
Defined in: packages/fate/lib/transport-
|
|
5
|
+
Defined in: packages/fate/lib/transport-DhaVVq4P.d.mts:692
|
|
6
6
|
|
|
7
7
|
Controls how `FateClient.hydrate()` reconciles a snapshot with browser cache state.
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
> **HydrationLimits** = `Readonly`\<\{ `maxCollectionLength`: `number`; `maxNodes`: `number`; `maxStringLength`: `number`; \}\>
|
|
4
4
|
|
|
5
|
-
Defined in: packages/fate/lib/transport-
|
|
5
|
+
Defined in: packages/fate/lib/transport-DhaVVq4P.d.mts:702
|
|
6
6
|
|
|
7
7
|
Resource limits applied while encoding and decoding hydration snapshots.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Pagination** = `object`
|
|
4
4
|
|
|
5
|
-
Defined in: packages/fate/lib/transport-
|
|
5
|
+
Defined in: packages/fate/lib/transport-DhaVVq4P.d.mts:1101
|
|
6
6
|
|
|
7
7
|
Pagination state returned alongside connection lists.
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ Pagination state returned alongside connection lists.
|
|
|
12
12
|
|
|
13
13
|
> **hasNext**: `boolean`
|
|
14
14
|
|
|
15
|
-
Defined in: packages/fate/lib/transport-
|
|
15
|
+
Defined in: packages/fate/lib/transport-DhaVVq4P.d.mts:1102
|
|
16
16
|
|
|
17
17
|
***
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:1101
|
|
|
20
20
|
|
|
21
21
|
> **hasPrevious**: `boolean`
|
|
22
22
|
|
|
23
|
-
Defined in: packages/fate/lib/transport-
|
|
23
|
+
Defined in: packages/fate/lib/transport-DhaVVq4P.d.mts:1103
|
|
24
24
|
|
|
25
25
|
***
|
|
26
26
|
|
|
@@ -28,7 +28,7 @@ Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:1102
|
|
|
28
28
|
|
|
29
29
|
> `optional` **nextCursor?**: `string`
|
|
30
30
|
|
|
31
|
-
Defined in: packages/fate/lib/transport-
|
|
31
|
+
Defined in: packages/fate/lib/transport-DhaVVq4P.d.mts:1104
|
|
32
32
|
|
|
33
33
|
***
|
|
34
34
|
|
|
@@ -36,4 +36,4 @@ Defined in: packages/fate/lib/transport-BjGm\_\_3t.d.mts:1103
|
|
|
36
36
|
|
|
37
37
|
> `optional` **previousCursor?**: `string`
|
|
38
38
|
|
|
39
|
-
Defined in: packages/fate/lib/transport-
|
|
39
|
+
Defined in: packages/fate/lib/transport-DhaVVq4P.d.mts:1105
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **ViewRef**\<`TName`\> = `Readonly`\<\{ `__typename`: `TName`; `[ViewsTag]`: `Set`\<`string`\>; `id`: `string` \| `number`; \}\>
|
|
4
4
|
|
|
5
|
-
Defined in: packages/fate/lib/transport-
|
|
5
|
+
Defined in: packages/fate/lib/transport-DhaVVq4P.d.mts:1083
|
|
6
6
|
|
|
7
7
|
Reference to a normalized entity instance that can be resolved against one or more view tags.
|
|
8
8
|
|
package/lib/index.mjs
CHANGED
|
@@ -78,6 +78,7 @@ function useView(view, ref) {
|
|
|
78
78
|
}
|
|
79
79
|
mergedSnapshotRef.current = null;
|
|
80
80
|
snapshotRef.current = null;
|
|
81
|
+
if (!coverage.length) return snapshot;
|
|
81
82
|
return Promise.resolve(snapshot).then((value) => {
|
|
82
83
|
const resolved = mergeCoverage(value);
|
|
83
84
|
snapshotRef.current = resolved;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-fate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "fate is a modern data client for React.",
|
|
5
5
|
"homepage": "https://github.com/nkzw-tech/fate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@nkzw/fate": "^1.3.
|
|
43
|
+
"@nkzw/fate": "^1.3.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/react": "^19.2.17",
|