@nkzw/fate 1.6.0 → 1.6.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/README.md +6 -14
- package/docs/api/classes/FateClient.md +35 -35
- package/docs/api/functions/clientRoot.md +1 -1
- package/docs/api/functions/createClient.md +1 -1
- package/docs/api/functions/createGraphQLTransport.md +1 -1
- package/docs/api/functions/createHTTPTransport.md +1 -1
- package/docs/api/functions/createTRPCTransport.md +1 -1
- package/docs/api/functions/defer.md +1 -1
- package/docs/api/functions/getDeferredMetadata.md +1 -1
- package/docs/api/functions/getListEntries.md +1 -1
- package/docs/api/functions/getSelectionPlan.md +1 -1
- package/docs/api/functions/graphqlMutation.md +1 -1
- package/docs/api/functions/isDeferred.md +1 -1
- package/docs/api/functions/isRecord.md +1 -1
- package/docs/api/functions/isViewTag.md +1 -1
- package/docs/api/functions/liveConnectionTopic.md +1 -1
- package/docs/api/functions/liveEntityTopic.md +1 -1
- package/docs/api/functions/liveGlobalConnectionTopic.md +1 -1
- package/docs/api/functions/mutation.md +1 -1
- package/docs/api/functions/toEntityId.md +1 -1
- package/docs/api/functions/view.md +1 -1
- package/docs/api/interfaces/FateThenable.md +3 -3
- package/docs/api/interfaces/Persistence.md +1 -1
- package/docs/api/interfaces/PersistenceSession.md +9 -9
- package/docs/api/interfaces/Transport.md +8 -8
- package/docs/api/server/classes/FateRequestError.md +5 -5
- package/docs/api/server/drizzle/functions/createDrizzleFate.md +1 -1
- package/docs/api/server/drizzle/functions/createDrizzleSourceAdapter.md +1 -1
- package/docs/api/server/drizzle/functions/createDrizzleSourceRegistry.md +1 -1
- package/docs/api/server/drizzle/type-aliases/DrizzleManyToManyConfig.md +1 -1
- package/docs/api/server/drizzle/type-aliases/DrizzleManyToManyInput.md +1 -1
- package/docs/api/server/drizzle/type-aliases/DrizzleQueryExtra.md +3 -3
- package/docs/api/server/drizzle/type-aliases/DrizzleSourceAdapter.md +9 -9
- package/docs/api/server/drizzle/type-aliases/DrizzleViewConfig.md +1 -1
- package/docs/api/server/functions/bindSourceProcedures.md +1 -1
- package/docs/api/server/functions/computed.md +1 -1
- package/docs/api/server/functions/count.md +1 -1
- package/docs/api/server/functions/createFateFetchHandler.md +1 -1
- package/docs/api/server/functions/createFateServer.md +1 -1
- package/docs/api/server/functions/createHonoFateHandler.md +1 -1
- package/docs/api/server/functions/createLiveEventBus.md +1 -1
- package/docs/api/server/functions/createNestedSourcePlan.md +1 -1
- package/docs/api/server/functions/createResolver.md +1 -1
- package/docs/api/server/functions/createSourcePlan.md +1 -1
- package/docs/api/server/functions/createSourceProcedures.md +1 -1
- package/docs/api/server/functions/dataView.md +1 -1
- package/docs/api/server/functions/field.md +1 -1
- package/docs/api/server/functions/getNestedSelection.md +1 -1
- package/docs/api/server/functions/getScopedArgs.md +1 -1
- package/docs/api/server/functions/hasNestedSelection.md +1 -1
- package/docs/api/server/functions/list.md +1 -1
- package/docs/api/server/functions/refetchSourceById.md +1 -1
- package/docs/api/server/functions/resolveSourceById.md +1 -1
- package/docs/api/server/functions/resolveSourceByIds.md +1 -1
- package/docs/api/server/functions/resolveSourceConnection.md +1 -1
- package/docs/api/server/functions/resolver.md +1 -1
- package/docs/api/server/functions/toPrismaSelect.md +1 -1
- package/docs/api/server/functions/withConnection.md +1 -1
- package/docs/api/server/prisma/functions/createPrismaFate.md +1 -1
- package/docs/api/server/prisma/functions/createPrismaSourceAdapter.md +1 -1
- package/docs/api/server/prisma/functions/createPrismaSourceRegistry.md +1 -1
- package/docs/api/server/prisma/functions/prismaConnectionArgs.md +1 -1
- package/docs/api/server/prisma/type-aliases/PrismaDelegate.md +4 -4
- package/docs/api/server/prisma/type-aliases/PrismaQueryExtra.md +1 -1
- package/docs/api/server/prisma/type-aliases/PrismaSourceAdapter.md +9 -9
- package/docs/api/server/prisma/type-aliases/PrismaViewConfig.md +1 -1
- package/docs/api/server/type-aliases/ComputedField.md +5 -5
- package/docs/api/server/type-aliases/ComputedSelection.md +1 -1
- package/docs/api/server/type-aliases/ConnectionItem.md +3 -3
- package/docs/api/server/type-aliases/ConnectionPagination.md +5 -5
- package/docs/api/server/type-aliases/ConnectionResult.md +3 -3
- package/docs/api/server/type-aliases/CountSelection.md +4 -4
- package/docs/api/server/type-aliases/CountWhere.md +1 -1
- package/docs/api/server/type-aliases/DataViewListOptions.md +2 -2
- package/docs/api/server/type-aliases/DataViewOrderBy.md +1 -1
- package/docs/api/server/type-aliases/DataViewOrderDirection.md +1 -1
- package/docs/api/server/type-aliases/DataViewResult.md +1 -1
- package/docs/api/server/type-aliases/Entity.md +1 -1
- package/docs/api/server/type-aliases/FateServer.md +5 -5
- package/docs/api/server/type-aliases/FateServerManifest.md +1 -1
- package/docs/api/server/type-aliases/FieldSelection.md +3 -3
- package/docs/api/server/type-aliases/LiveConnectionEventType.md +1 -1
- package/docs/api/server/type-aliases/LiveConnectionSourceEvent.md +1 -1
- package/docs/api/server/type-aliases/LiveEventBus.md +1 -1
- package/docs/api/server/type-aliases/LiveEventType.md +1 -1
- package/docs/api/server/type-aliases/LiveSourceEvent.md +1 -1
- package/docs/api/server/type-aliases/NativeFateAPI.md +4 -4
- package/docs/api/server/type-aliases/OrderDirection.md +1 -1
- package/docs/api/server/type-aliases/SourceConfig.md +6 -6
- package/docs/api/server/type-aliases/SourceDefinition.md +6 -6
- package/docs/api/server/type-aliases/SourceOrder.md +1 -1
- package/docs/api/server/type-aliases/SourceOrderField.md +3 -3
- package/docs/api/server/type-aliases/SourcePlan.md +1 -1
- package/docs/api/server/type-aliases/SourcePlanNode.md +1 -1
- package/docs/api/server/type-aliases/SourceRegistry.md +1 -1
- package/docs/api/server/type-aliases/SourceRelation.md +1 -1
- package/docs/api/server/type-aliases/SourceRelationConfig.md +1 -1
- package/docs/api/server/variables/byIdInput.md +1 -1
- package/docs/api/server/variables/connectionArgs.md +1 -1
- package/docs/api/type-aliases/ConnectionMetadata.md +1 -1
- package/docs/api/type-aliases/ConnectionRef.md +1 -1
- package/docs/api/type-aliases/Deferred.md +1 -1
- package/docs/api/type-aliases/DeferredMetadata.md +1 -1
- package/docs/api/type-aliases/DeferredSelection.md +1 -1
- package/docs/api/type-aliases/DeferredSnapshot.md +1 -1
- package/docs/api/type-aliases/Entity.md +2 -2
- package/docs/api/type-aliases/EntityId.md +1 -1
- package/docs/api/type-aliases/FateDehydratedState.md +1 -1
- package/docs/api/type-aliases/FateLiveConnectionEvent.md +1 -1
- package/docs/api/type-aliases/FateLiveEvent.md +1 -1
- package/docs/api/type-aliases/FateMutations.md +1 -1
- package/docs/api/type-aliases/FateOperation.md +1 -1
- package/docs/api/type-aliases/FateProtocolRequest.md +1 -1
- package/docs/api/type-aliases/FateProtocolResponse.md +1 -1
- package/docs/api/type-aliases/FateRecord.md +1 -1
- package/docs/api/type-aliases/FateRoots.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 +12 -12
- 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/List.md +1 -1
- package/docs/api/type-aliases/ListEntry.md +1 -1
- package/docs/api/type-aliases/ListItem.md +1 -1
- package/docs/api/type-aliases/Mask.md +1 -1
- package/docs/api/type-aliases/MutationDefinition.md +1 -1
- package/docs/api/type-aliases/MutationEntity.md +1 -1
- package/docs/api/type-aliases/MutationIdentifier.md +1 -1
- package/docs/api/type-aliases/MutationIdentity.md +1 -1
- package/docs/api/type-aliases/MutationInput.md +1 -1
- package/docs/api/type-aliases/MutationResult.md +1 -1
- package/docs/api/type-aliases/NodesItem.md +1 -1
- package/docs/api/type-aliases/Pagination.md +5 -5
- package/docs/api/type-aliases/PersistedMutationStatus.md +1 -1
- package/docs/api/type-aliases/PersistenceSnapshot.md +1 -1
- package/docs/api/type-aliases/Request.md +1 -1
- package/docs/api/type-aliases/RequestMode.md +1 -1
- package/docs/api/type-aliases/RequestOptions.md +1 -1
- package/docs/api/type-aliases/RequestPersistenceOptions.md +1 -1
- package/docs/api/type-aliases/RequestResult.md +1 -1
- package/docs/api/type-aliases/Selection.md +1 -1
- package/docs/api/type-aliases/TypeConfig.md +4 -4
- package/docs/api/type-aliases/View.md +1 -1
- package/docs/api/type-aliases/ViewData.md +1 -1
- package/docs/api/type-aliases/ViewEntity.md +1 -1
- package/docs/api/type-aliases/ViewEntityName.md +1 -1
- package/docs/api/type-aliases/ViewRef.md +1 -1
- package/docs/api/type-aliases/ViewSelection.md +1 -1
- package/docs/api/type-aliases/ViewSnapshot.md +1 -1
- package/docs/api/type-aliases/ViewTag.md +1 -1
- package/docs/api/variables/ConnectionTag.md +1 -1
- package/docs/api/variables/DeferTag.md +1 -1
- package/docs/api/variables/DeferredTag.md +1 -1
- package/docs/guide/getting-started.md +1 -9
- package/docs/integrations/cloudflare.md +1 -1
- package/docs/integrations/graphql.md +2 -2
- package/docs/integrations/void.md +2 -2
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **MutationIdentifier**\<`T`, `I`, `R`\> = [`MutationDefinition`](MutationDefinition.md)\<`T`, `I`, `R`\> & `Readonly`\<\{ `key`: `string`; \}\>
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:473](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:473](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L473)
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
> **MutationIdentity** = `Readonly`\<\{ `id`: `string`; `replayOnly?`: `true`; `scope`: `string`; \}\>
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/persistence-types.ts:7](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/persistence-types.ts:7](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/persistence-types.ts#L7)
|
|
6
6
|
|
|
7
7
|
Identity of one logical mutation, reused across every delivery attempt.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **MutationInput**\<`M`\> = `M` *extends* `__MutationInputAnchor`\<infer I\> ? `I` : `never`
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:477](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:477](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L477)
|
|
6
6
|
|
|
7
7
|
Extracts the input type from a mutation definition or identifier.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **MutationResult**\<`M`\> = `M` *extends* `__MutationResultAnchor`\<infer R\> ? `R` : `never`
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:480](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:480](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L480)
|
|
6
6
|
|
|
7
7
|
Extracts the result type from a mutation definition or identifier.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **NodesItem**\<`V`\> = `Readonly`\<\{ `ids`: `ReadonlyArray`\<`string` \| `number`\>; `view`: `V`; \}\>
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:365](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:365](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L365)
|
|
6
6
|
|
|
7
7
|
Definition of a node request with explicit IDs for fetching data from the backend.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Pagination** = `object`
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:130](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:130](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L130)
|
|
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: [fate/src/types.ts:131](https://github.com/nkzw-tech/fate/blob/
|
|
15
|
+
Defined in: [fate/src/types.ts:131](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L131)
|
|
16
16
|
|
|
17
17
|
***
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ Defined in: [fate/src/types.ts:131](https://github.com/nkzw-tech/fate/blob/affa9
|
|
|
20
20
|
|
|
21
21
|
> **hasPrevious**: `boolean`
|
|
22
22
|
|
|
23
|
-
Defined in: [fate/src/types.ts:132](https://github.com/nkzw-tech/fate/blob/
|
|
23
|
+
Defined in: [fate/src/types.ts:132](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L132)
|
|
24
24
|
|
|
25
25
|
***
|
|
26
26
|
|
|
@@ -28,7 +28,7 @@ Defined in: [fate/src/types.ts:132](https://github.com/nkzw-tech/fate/blob/affa9
|
|
|
28
28
|
|
|
29
29
|
> `optional` **nextCursor?**: `string`
|
|
30
30
|
|
|
31
|
-
Defined in: [fate/src/types.ts:133](https://github.com/nkzw-tech/fate/blob/
|
|
31
|
+
Defined in: [fate/src/types.ts:133](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L133)
|
|
32
32
|
|
|
33
33
|
***
|
|
34
34
|
|
|
@@ -36,4 +36,4 @@ Defined in: [fate/src/types.ts:133](https://github.com/nkzw-tech/fate/blob/affa9
|
|
|
36
36
|
|
|
37
37
|
> `optional` **previousCursor?**: `string`
|
|
38
38
|
|
|
39
|
-
Defined in: [fate/src/types.ts:134](https://github.com/nkzw-tech/fate/blob/
|
|
39
|
+
Defined in: [fate/src/types.ts:134](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L134)
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
> **PersistedMutationStatus** = `Readonly`\<\{ `error?`: `string`; `id`: `string`; `input`: `unknown`; `name`: `string`; `status`: `"queued"` \| `"sending"` \| `"failed"`; \}\>
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/persistence-types.ts:20](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/persistence-types.ts:20](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/persistence-types.ts#L20)
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
> **PersistenceSnapshot** = `Readonly`\<\{ `error?`: `Error`; `mutations`: `ReadonlyArray`\<[`PersistedMutationStatus`](PersistedMutationStatus.md)\>; `status`: `"restoring"` \| `"ready"` \| `"error"` \| `"disposed"`; \}\>
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/persistence-types.ts:28](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/persistence-types.ts:28](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/persistence-types.ts#L28)
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
> **Request** = `Record`\<`string`, `RequestItem`\>
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:377](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:377](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L377)
|
|
6
6
|
|
|
7
7
|
Collection of node and list requests describing the data a screen needs.
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
> **RequestMode** = `"cache-first"` \| `"stale-while-revalidate"` \| `"network-only"`
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/client.ts:96](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/client.ts:96](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/client.ts#L96)
|
|
6
6
|
|
|
7
7
|
Strategy used when resolving a request.
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
> **RequestOptions** = `Readonly`\<\{ `mode?`: [`RequestMode`](RequestMode.md); `persist?`: [`RequestPersistenceOptions`](RequestPersistenceOptions.md); \}\>
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/client.ts:107](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/client.ts:107](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/client.ts#L107)
|
|
6
6
|
|
|
7
7
|
Request options that affect how requests are fetched and retained.
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
> **RequestPersistenceOptions** = `Readonly`\<\{ `maxAge`: `number`; \}\>
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/persistence-types.ts:34](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/persistence-types.ts:34](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/persistence-types.ts#L34)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **RequestResult**\<`R`, `Q`\> = `{ [K in keyof Q]: K extends keyof R ? ListResult<Q[K], RootType<R[K]>, RootResult<R[K]>> : never }`
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:423](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:423](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L423)
|
|
6
6
|
|
|
7
7
|
The result of a `FateClient.request` and `useRequest` call, mapping each
|
|
8
8
|
request key to its corresponding result.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Selection**\<`T`\> = `SelectionShape`\<`T`\> & `SelectionViewSpread`\<`T`\>
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:228](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:228](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L228)
|
|
6
6
|
|
|
7
7
|
Declarative selection of the fields a view needs from an entity.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **TypeConfig** = `object`
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:123](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:123](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L123)
|
|
6
6
|
|
|
7
7
|
Configuration for a server entity type used by the client cache.
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ Configuration for a server entity type used by the client cache.
|
|
|
12
12
|
|
|
13
13
|
> `optional` **fields?**: `Record`\<`string`, `RelationDescriptor`\>
|
|
14
14
|
|
|
15
|
-
Defined in: [fate/src/types.ts:124](https://github.com/nkzw-tech/fate/blob/
|
|
15
|
+
Defined in: [fate/src/types.ts:124](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L124)
|
|
16
16
|
|
|
17
17
|
***
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ Defined in: [fate/src/types.ts:124](https://github.com/nkzw-tech/fate/blob/affa9
|
|
|
20
20
|
|
|
21
21
|
> **getId**: (`record`) => `string` \| `number`
|
|
22
22
|
|
|
23
|
-
Defined in: [fate/src/types.ts:125](https://github.com/nkzw-tech/fate/blob/
|
|
23
|
+
Defined in: [fate/src/types.ts:125](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L125)
|
|
24
24
|
|
|
25
25
|
#### Parameters
|
|
26
26
|
|
|
@@ -38,4 +38,4 @@ Defined in: [fate/src/types.ts:125](https://github.com/nkzw-tech/fate/blob/affa9
|
|
|
38
38
|
|
|
39
39
|
> **type**: `string`
|
|
40
40
|
|
|
41
|
-
Defined in: [fate/src/types.ts:126](https://github.com/nkzw-tech/fate/blob/
|
|
41
|
+
Defined in: [fate/src/types.ts:126](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L126)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **View**\<`T`, `S`\> = `Readonly`\<\{\[`viewTag`: `` `__fate-view__${string}` ``\]: `Readonly`\<\{ `[ViewKind]`: `true`; `select`: `S`; \}\>; \}\> & `__ViewEntityAnchor`\<`T`\> & `__ViewSelectionAnchor`\<`S`\>
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:244](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:244](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L244)
|
|
6
6
|
|
|
7
7
|
Definition of a view over an entity type, including the selection of fields.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **ViewData**\<`T`, `S`\> = `Readonly`\<`S` *extends* [`Selection`](Selection.md)\<`T`\> ? [`Mask`](Mask.md)\<`T`, `S`\> : `T` & `object`\>
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:260](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:260](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L260)
|
|
6
6
|
|
|
7
7
|
Data returned from a resolved view with masking applied and view tags
|
|
8
8
|
attached for downstream composition.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **ViewEntity**\<`V`\> = `V` *extends* [`View`](View.md)\<infer T, `any`\> ? `T` : `never`
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:334](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:334](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L334)
|
|
6
6
|
|
|
7
7
|
Entity type captured from a view definition.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **ViewEntityName**\<`V`\> = [`ViewEntity`](ViewEntity.md)\<`V`\>\[`"__typename"`\] & `string`
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:337](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:337](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L337)
|
|
6
6
|
|
|
7
7
|
Name of the entity type captured from a view definition.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **ViewRef**\<`TName`\> = `Readonly`\<\{ `__typename`: `TName`; `[ViewsTag]`: `Set`\<`string`\>; `id`: `string` \| `number`; \}\>
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:107](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:107](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L107)
|
|
6
6
|
|
|
7
7
|
Reference to a normalized entity instance that can be resolved against one or more view tags.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **ViewSelection**\<`V`\> = `V` *extends* `object` ? `S` : `never`
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:340](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:340](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L340)
|
|
6
6
|
|
|
7
7
|
Selection captured from a view definition.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **ViewSnapshot**\<`T`, `S`\> = `Readonly`\<\{ `coverage`: `ReadonlyArray`\<readonly \[[`EntityId`](EntityId.md), `ReadonlySet`\<`string`\>\]\>; `data`: [`ViewData`](ViewData.md)\<`T`, `S`\>; \}\>
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:270](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:270](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L270)
|
|
6
6
|
|
|
7
7
|
Snapshot returned by the cache for a view, including the masked data and all
|
|
8
8
|
referenced entity IDs.
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
> **ViewTag** = `` `__fate-view__${string}` ``
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:55](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:55](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L55)
|
|
6
6
|
|
|
7
7
|
Unique key that identifies a view composition entry inside a selection or reference.
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
> `const` **ConnectionTag**: *typeof* `ConnectionTag`
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:19](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:19](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L19)
|
|
6
6
|
|
|
7
7
|
Symbol attached to connection results so pagination helpers can find their metadata.
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
> `const` **DeferTag**: *typeof* `DeferTag`
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:22](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:22](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L22)
|
|
6
6
|
|
|
7
7
|
Symbol used to mark a selection as deferred.
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
> `const` **DeferredTag**: *typeof* `DeferredTag`
|
|
4
4
|
|
|
5
|
-
Defined in: [fate/src/types.ts:25](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [fate/src/types.ts:25](https://github.com/nkzw-tech/fate/blob/773f575cc13a2695a877106a1b35db101b2e431d/packages/fate/src/types.ts#L25)
|
|
6
6
|
|
|
7
7
|
Symbol attached to deferred values returned from masked views.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Create a new fate app with Vite+:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
vp create fate
|
|
8
|
+
vp create fate
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Explore the [fate stack](https://stack.fate.technology) to see the tools included in your new project.
|
|
@@ -67,11 +67,3 @@ yarn add @nkzw/fate
|
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
:::
|
|
70
|
-
|
|
71
|
-
> [!WARNING]
|
|
72
|
-
>
|
|
73
|
-
> **_fate_** is currently in alpha and not production ready. If something doesn't work for you, please open a pull request.
|
|
74
|
-
|
|
75
|
-
If you'd like to try the example app in GitHub Codespaces, click the button below:
|
|
76
|
-
|
|
77
|
-
[](https://github.com/codespaces/new?repo=nkzw-tech/fate)
|
|
@@ -9,13 +9,13 @@ Use the GraphQL transport when your backend already exposes GraphQL and you want
|
|
|
9
9
|
Create a client for an existing GraphQL server with:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
vp create fate
|
|
12
|
+
vp create fate -- --template graphql-client
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Create a full GraphQL + Prisma example app with:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
vp create fate
|
|
18
|
+
vp create fate -- --template graphql
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
The client-only template is the smallest reference for the integration. It contains a `src/fate/graphql.ts` file that maps your GraphQL schema to fate views and roots.
|
|
@@ -10,13 +10,13 @@ setup without copying its adapter glue.
|
|
|
10
10
|
For a new Void app, start from the Void template. It includes the client, Void routes, Drizzle setup, live transport, auth wiring, and generated fate client setup.
|
|
11
11
|
|
|
12
12
|
```sh
|
|
13
|
-
vp create fate
|
|
13
|
+
vp create fate -- --template void
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Use Vue instead of React with:
|
|
17
17
|
|
|
18
18
|
```sh
|
|
19
|
-
vp create fate
|
|
19
|
+
vp create fate -- --template void --framework vue
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
## Existing Project
|