@nkzw/fate 1.3.0 → 1.3.2
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 +179 -1
- package/docs/api/classes/FateClient.md +40 -40
- 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/Transport.md +7 -7
- 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 +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/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/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/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/RequestResult.md +1 -1
- package/docs/api/type-aliases/Selection.md +1 -1
- package/docs/api/type-aliases/Snapshot.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/integrations/cloudflare.md +19 -1
- package/docs/integrations/void.md +17 -1
- package/lib/{executor-Dh-MLUXc.d.mts → executor-C8HNogYG.d.mts} +1 -1
- package/lib/{graphqlTransport-IFgmY-Qq.mjs → graphqlTransport-DSBVS2Fq.mjs} +20 -15
- package/lib/{graphqlTransport-B3cbhvJX.d.mts → graphqlTransport-DskuXeUP.d.mts} +1 -1
- package/lib/graphqlTransport.d.mts +1 -1
- package/lib/graphqlTransport.mjs +1 -1
- package/lib/index.d.mts +4 -4
- package/lib/index.mjs +36 -25
- package/lib/{list-BrL6PD_6.d.mts → list-sI2UPhHc.d.mts} +1 -1
- package/lib/list.d.mts +1 -1
- package/lib/{liveTopics-JIDh3t3P.mjs → liveTopics-uVP0LG-Q.mjs} +1 -1
- package/lib/{record-BkvZwvFk.d.mts → record-CZyyeLa3.d.mts} +2 -2
- package/lib/server/drizzle.d.mts +2 -2
- package/lib/server/drizzle.mjs +43 -31
- package/lib/server/prisma.d.mts +2 -2
- package/lib/server/prisma.mjs +10 -8
- package/lib/server.d.mts +3 -3
- package/lib/server.mjs +23 -20
- package/lib/{sourceRouter-N9Vp0Cj6.mjs → sourceRouter-DSaADXSf.mjs} +8 -4
- package/lib/{transport-BjGm__3t.d.mts → transport-DhaVVq4P.d.mts} +3 -2
- package/lib/vite.mjs +6 -5
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2676,7 +2676,23 @@ _And you are all set. Happy building!_
|
|
|
2676
2676
|
Use this integration when your app runs on Void and you want the example app's
|
|
2677
2677
|
setup without copying its adapter glue.
|
|
2678
2678
|
|
|
2679
|
-
###
|
|
2679
|
+
### New Project
|
|
2680
|
+
|
|
2681
|
+
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.
|
|
2682
|
+
|
|
2683
|
+
```sh
|
|
2684
|
+
vp create fate my-app --template void
|
|
2685
|
+
```
|
|
2686
|
+
|
|
2687
|
+
Use Vue instead of React with:
|
|
2688
|
+
|
|
2689
|
+
```sh
|
|
2690
|
+
vp create fate my-app --template void --framework vue
|
|
2691
|
+
```
|
|
2692
|
+
|
|
2693
|
+
### Existing Project
|
|
2694
|
+
|
|
2695
|
+
For an existing Void project, add the packages directly:
|
|
2680
2696
|
|
|
2681
2697
|
::: code-group
|
|
2682
2698
|
|
|
@@ -2919,6 +2935,168 @@ falls back to the in-memory live bus for the current request context.
|
|
|
2919
2935
|
The live transport is best-effort and does not replay missed events after a
|
|
2920
2936
|
client reconnects. This matches fate's default in-memory live event bus.
|
|
2921
2937
|
|
|
2938
|
+
## Cloudflare Integration
|
|
2939
|
+
|
|
2940
|
+
`cf-fate` is the first-class Cloudflare Workers adapter for Fate native HTTP transport and live views.
|
|
2941
|
+
|
|
2942
|
+
Use it when your backend runs directly on Cloudflare Workers and you want fate live views without adopting the Void platform.
|
|
2943
|
+
|
|
2944
|
+
### New Project
|
|
2945
|
+
|
|
2946
|
+
For a new Cloudflare Workers app, start from the Cloudflare template. It includes the client, Worker server, D1 migrations, Wrangler config, Durable Object live transport, auth wiring, and generated fate client setup.
|
|
2947
|
+
|
|
2948
|
+
```sh
|
|
2949
|
+
vp create fate my-app --template cloudflare
|
|
2950
|
+
```
|
|
2951
|
+
|
|
2952
|
+
Use Vue instead of React with:
|
|
2953
|
+
|
|
2954
|
+
```sh
|
|
2955
|
+
vp create fate my-app --template cloudflare --framework vue
|
|
2956
|
+
```
|
|
2957
|
+
|
|
2958
|
+
### Existing Project
|
|
2959
|
+
|
|
2960
|
+
For an existing Cloudflare Workers project, add the packages directly:
|
|
2961
|
+
|
|
2962
|
+
```sh
|
|
2963
|
+
pnpm add @nkzw/fate react-fate cf-fate drizzle-orm
|
|
2964
|
+
pnpm add -D wrangler
|
|
2965
|
+
```
|
|
2966
|
+
|
|
2967
|
+
For Vue clients, replace `react-fate` with `vue-fate`.
|
|
2968
|
+
|
|
2969
|
+
### Server Setup
|
|
2970
|
+
|
|
2971
|
+
Create a Cloudflare live stream and pass its Fate live facade to `createFateServer`.
|
|
2972
|
+
|
|
2973
|
+
```ts
|
|
2974
|
+
// src/fate/live.ts
|
|
2975
|
+
import { defineCloudflareFateLiveStream } from 'cf-fate/server';
|
|
2976
|
+
|
|
2977
|
+
export const fateStream = defineCloudflareFateLiveStream({
|
|
2978
|
+
allowAnonymousControl: true,
|
|
2979
|
+
binding: 'FATE_LIVE',
|
|
2980
|
+
id: 'fate',
|
|
2981
|
+
});
|
|
2982
|
+
```
|
|
2983
|
+
|
|
2984
|
+
```ts
|
|
2985
|
+
// src/fate/server.ts
|
|
2986
|
+
import { createFateServer } from '@nkzw/fate/server';
|
|
2987
|
+
import { createCloudflareFateLive } from 'cf-fate/server';
|
|
2988
|
+
|
|
2989
|
+
export const fateLive = createCloudflareFateLive();
|
|
2990
|
+
export const { live } = fateLive;
|
|
2991
|
+
|
|
2992
|
+
export const fateServer = createFateServer({
|
|
2993
|
+
live,
|
|
2994
|
+
// context,
|
|
2995
|
+
// roots,
|
|
2996
|
+
// sources,
|
|
2997
|
+
});
|
|
2998
|
+
```
|
|
2999
|
+
|
|
3000
|
+
Publish from mutations through the normal Fate live bus:
|
|
3001
|
+
|
|
3002
|
+
```ts
|
|
3003
|
+
live.update('Post', postId, { changed: ['likes'] });
|
|
3004
|
+
live.connection('Post.comments', { id: postId }).appendNode('Comment', commentId);
|
|
3005
|
+
```
|
|
3006
|
+
|
|
3007
|
+
### Worker Routes
|
|
3008
|
+
|
|
3009
|
+
Expose one route for Fate RPC and one route for the SSE live stream.
|
|
3010
|
+
|
|
3011
|
+
```ts
|
|
3012
|
+
import {
|
|
3013
|
+
createCloudflareFateLiveDurableObject,
|
|
3014
|
+
defineCloudflareFateLiveRoute,
|
|
3015
|
+
defineCloudflareFateRoute,
|
|
3016
|
+
} from 'cf-fate/server';
|
|
3017
|
+
import { fateStream } from './fate/live';
|
|
3018
|
+
import { fateLive, fateServer } from './fate/server';
|
|
3019
|
+
|
|
3020
|
+
const fateRoute = defineCloudflareFateRoute(fateServer, fateLive, { stream: fateStream });
|
|
3021
|
+
const fateLiveRoute = defineCloudflareFateLiveRoute(fateStream);
|
|
3022
|
+
|
|
3023
|
+
export const FateLiveDurableObject = createCloudflareFateLiveDurableObject({
|
|
3024
|
+
binding: 'FATE_LIVE',
|
|
3025
|
+
});
|
|
3026
|
+
|
|
3027
|
+
export default {
|
|
3028
|
+
fetch(request, env, ctx) {
|
|
3029
|
+
const url = new URL(request.url);
|
|
3030
|
+
if (url.pathname === '/fate') {
|
|
3031
|
+
return fateRoute.fetch(request, env, ctx);
|
|
3032
|
+
}
|
|
3033
|
+
if (url.pathname === '/fate-live') {
|
|
3034
|
+
return fateLiveRoute.fetch(request, env, ctx);
|
|
3035
|
+
}
|
|
3036
|
+
return new Response('Not Found', { status: 404 });
|
|
3037
|
+
},
|
|
3038
|
+
};
|
|
3039
|
+
```
|
|
3040
|
+
|
|
3041
|
+
### Wrangler
|
|
3042
|
+
|
|
3043
|
+
Add a Durable Object binding and migration. `cf-fate` uses `node:async_hooks`, so the Worker must enable Node compatibility.
|
|
3044
|
+
|
|
3045
|
+
```jsonc
|
|
3046
|
+
{
|
|
3047
|
+
"compatibility_flags": ["nodejs_compat"],
|
|
3048
|
+
"durable_objects": {
|
|
3049
|
+
"bindings": [
|
|
3050
|
+
{
|
|
3051
|
+
"name": "FATE_LIVE",
|
|
3052
|
+
"class_name": "FateLiveDurableObject",
|
|
3053
|
+
},
|
|
3054
|
+
],
|
|
3055
|
+
},
|
|
3056
|
+
"migrations": [
|
|
3057
|
+
{
|
|
3058
|
+
"tag": "fate-live-v1",
|
|
3059
|
+
"new_sqlite_classes": ["FateLiveDurableObject"],
|
|
3060
|
+
},
|
|
3061
|
+
],
|
|
3062
|
+
}
|
|
3063
|
+
```
|
|
3064
|
+
|
|
3065
|
+
### Client
|
|
3066
|
+
|
|
3067
|
+
Use the Cloudflare transport in the Fate Vite plugin:
|
|
3068
|
+
|
|
3069
|
+
```ts
|
|
3070
|
+
import { fate } from 'react-fate/vite';
|
|
3071
|
+
|
|
3072
|
+
fate({
|
|
3073
|
+
module: './src/fate/server.ts',
|
|
3074
|
+
transport: 'cloudflare',
|
|
3075
|
+
});
|
|
3076
|
+
```
|
|
3077
|
+
|
|
3078
|
+
Then point the generated client at the Worker endpoints:
|
|
3079
|
+
|
|
3080
|
+
```tsx
|
|
3081
|
+
import { FateClient } from 'react-fate';
|
|
3082
|
+
import { createFateClient } from 'react-fate/client';
|
|
3083
|
+
|
|
3084
|
+
const fate = createFateClient({
|
|
3085
|
+
liveUrl: 'http://localhost:8787/fate-live',
|
|
3086
|
+
url: 'http://localhost:8787/fate',
|
|
3087
|
+
});
|
|
3088
|
+
|
|
3089
|
+
export function App({ children }) {
|
|
3090
|
+
return <FateClient client={fate}>{children}</FateClient>;
|
|
3091
|
+
}
|
|
3092
|
+
```
|
|
3093
|
+
|
|
3094
|
+
### Semantics
|
|
3095
|
+
|
|
3096
|
+
`cf-fate` uses one browser `EventSource` per Fate client and multiplexes entity and connection topics over that stream. Durable Objects keep connection and topic subscription state so later requests, mutations, scheduled handlers, and queue consumers can publish to already-connected clients.
|
|
3097
|
+
|
|
3098
|
+
Delivery is at-most-once. Events are ordered within one topic, but events are not durably replayed after a disconnect. Use authoritative refetching or application-owned replay storage if missed events must be recovered.
|
|
3099
|
+
|
|
2922
3100
|
## Frequently Asked Questions
|
|
2923
3101
|
|
|
2924
3102
|
### Is this serious software?
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Class: FateClient\<Roots, Mutations, HydrationScope\>
|
|
2
2
|
|
|
3
|
-
Defined in: [packages/fate/src/client.ts:414](https://github.com/nkzw-tech/fate/blob/
|
|
3
|
+
Defined in: [packages/fate/src/client.ts:414](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L414)
|
|
4
4
|
|
|
5
5
|
Core client that normalizes records, manages the view cache, and coordinates
|
|
6
6
|
data fetching.
|
|
@@ -25,7 +25,7 @@ data fetching.
|
|
|
25
25
|
|
|
26
26
|
> **new FateClient**\<`Roots`, `Mutations`, `HydrationScope`\>(`options`): `FateClient`\<`Roots`, `Mutations`, `HydrationScope`\>
|
|
27
27
|
|
|
28
|
-
Defined in: [packages/fate/src/client.ts:461](https://github.com/nkzw-tech/fate/blob/
|
|
28
|
+
Defined in: [packages/fate/src/client.ts:461](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L461)
|
|
29
29
|
|
|
30
30
|
#### Parameters
|
|
31
31
|
|
|
@@ -43,7 +43,7 @@ Defined in: [packages/fate/src/client.ts:461](https://github.com/nkzw-tech/fate/
|
|
|
43
43
|
|
|
44
44
|
> `readonly` **actions**: `MutationTreeFromRecord`\<`Mutations`\>
|
|
45
45
|
|
|
46
|
-
Defined in: [packages/fate/src/client.ts:457](https://github.com/nkzw-tech/fate/blob/
|
|
46
|
+
Defined in: [packages/fate/src/client.ts:457](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L457)
|
|
47
47
|
|
|
48
48
|
***
|
|
49
49
|
|
|
@@ -51,7 +51,7 @@ Defined in: [packages/fate/src/client.ts:457](https://github.com/nkzw-tech/fate/
|
|
|
51
51
|
|
|
52
52
|
> `readonly` **mutations**: `MutationTreeFromRecord`\<`Mutations`\>
|
|
53
53
|
|
|
54
|
-
Defined in: [packages/fate/src/client.ts:458](https://github.com/nkzw-tech/fate/blob/
|
|
54
|
+
Defined in: [packages/fate/src/client.ts:458](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L458)
|
|
55
55
|
|
|
56
56
|
***
|
|
57
57
|
|
|
@@ -59,7 +59,7 @@ Defined in: [packages/fate/src/client.ts:458](https://github.com/nkzw-tech/fate/
|
|
|
59
59
|
|
|
60
60
|
> `readonly` **roots**: `Roots`
|
|
61
61
|
|
|
62
|
-
Defined in: [packages/fate/src/client.ts:459](https://github.com/nkzw-tech/fate/blob/
|
|
62
|
+
Defined in: [packages/fate/src/client.ts:459](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L459)
|
|
63
63
|
|
|
64
64
|
***
|
|
65
65
|
|
|
@@ -67,7 +67,7 @@ Defined in: [packages/fate/src/client.ts:459](https://github.com/nkzw-tech/fate/
|
|
|
67
67
|
|
|
68
68
|
> `readonly` **store**: `Store`
|
|
69
69
|
|
|
70
|
-
Defined in: [packages/fate/src/client.ts:448](https://github.com/nkzw-tech/fate/blob/
|
|
70
|
+
Defined in: [packages/fate/src/client.ts:448](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L448)
|
|
71
71
|
|
|
72
72
|
## Methods
|
|
73
73
|
|
|
@@ -75,7 +75,7 @@ Defined in: [packages/fate/src/client.ts:448](https://github.com/nkzw-tech/fate/
|
|
|
75
75
|
|
|
76
76
|
> **assertLiveConnectionSupport**(): `void`
|
|
77
77
|
|
|
78
|
-
Defined in: [packages/fate/src/client.ts:1098](https://github.com/nkzw-tech/fate/blob/
|
|
78
|
+
Defined in: [packages/fate/src/client.ts:1098](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L1098)
|
|
79
79
|
|
|
80
80
|
#### Returns
|
|
81
81
|
|
|
@@ -87,7 +87,7 @@ Defined in: [packages/fate/src/client.ts:1098](https://github.com/nkzw-tech/fate
|
|
|
87
87
|
|
|
88
88
|
> **assertLiveViewSupport**(): `void`
|
|
89
89
|
|
|
90
|
-
Defined in: [packages/fate/src/client.ts:1090](https://github.com/nkzw-tech/fate/blob/
|
|
90
|
+
Defined in: [packages/fate/src/client.ts:1090](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L1090)
|
|
91
91
|
|
|
92
92
|
#### Returns
|
|
93
93
|
|
|
@@ -99,7 +99,7 @@ Defined in: [packages/fate/src/client.ts:1090](https://github.com/nkzw-tech/fate
|
|
|
99
99
|
|
|
100
100
|
> **clearOptimisticUpdate**(`token`): `void`
|
|
101
101
|
|
|
102
|
-
Defined in: [packages/fate/src/client.ts:1749](https://github.com/nkzw-tech/fate/blob/
|
|
102
|
+
Defined in: [packages/fate/src/client.ts:1749](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L1749)
|
|
103
103
|
|
|
104
104
|
#### Parameters
|
|
105
105
|
|
|
@@ -117,7 +117,7 @@ Defined in: [packages/fate/src/client.ts:1749](https://github.com/nkzw-tech/fate
|
|
|
117
117
|
|
|
118
118
|
> **dehydrate**(): [`FateDehydratedState`](../type-aliases/FateDehydratedState.md)\<`HydrationScope`\>
|
|
119
119
|
|
|
120
|
-
Defined in: [packages/fate/src/client.ts:553](https://github.com/nkzw-tech/fate/blob/
|
|
120
|
+
Defined in: [packages/fate/src/client.ts:553](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L553)
|
|
121
121
|
|
|
122
122
|
Exports the durable normalized cache as an opaque JSON-safe value for SSR
|
|
123
123
|
transfer or persistence. Runtime requests, subscriptions, retainers, and
|
|
@@ -133,7 +133,7 @@ optimistic state are intentionally excluded.
|
|
|
133
133
|
|
|
134
134
|
> **deleteRecord**(`type`, `id`, `snapshots?`, `listSnapshots?`): `void`
|
|
135
135
|
|
|
136
|
-
Defined in: [packages/fate/src/client.ts:803](https://github.com/nkzw-tech/fate/blob/
|
|
136
|
+
Defined in: [packages/fate/src/client.ts:803](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L803)
|
|
137
137
|
|
|
138
138
|
#### Parameters
|
|
139
139
|
|
|
@@ -163,7 +163,7 @@ Defined in: [packages/fate/src/client.ts:803](https://github.com/nkzw-tech/fate/
|
|
|
163
163
|
|
|
164
164
|
> **executeMutation**(`key`, `input`, `select`, `options?`): `Promise`\<`unknown`\>
|
|
165
165
|
|
|
166
|
-
Defined in: [packages/fate/src/client.ts:745](https://github.com/nkzw-tech/fate/blob/
|
|
166
|
+
Defined in: [packages/fate/src/client.ts:745](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L745)
|
|
167
167
|
|
|
168
168
|
#### Parameters
|
|
169
169
|
|
|
@@ -199,7 +199,7 @@ Defined in: [packages/fate/src/client.ts:745](https://github.com/nkzw-tech/fate/
|
|
|
199
199
|
|
|
200
200
|
> **filterSelectionForPendingOptimistics**(`entityId`, `select`, `options?`): `Set`\<`string`\>
|
|
201
201
|
|
|
202
|
-
Defined in: [packages/fate/src/client.ts:1812](https://github.com/nkzw-tech/fate/blob/
|
|
202
|
+
Defined in: [packages/fate/src/client.ts:1812](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L1812)
|
|
203
203
|
|
|
204
204
|
#### Parameters
|
|
205
205
|
|
|
@@ -227,7 +227,7 @@ Defined in: [packages/fate/src/client.ts:1812](https://github.com/nkzw-tech/fate
|
|
|
227
227
|
|
|
228
228
|
> **gc**(): `void`
|
|
229
229
|
|
|
230
|
-
Defined in: [packages/fate/src/client.ts:2135](https://github.com/nkzw-tech/fate/blob/
|
|
230
|
+
Defined in: [packages/fate/src/client.ts:2135](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L2135)
|
|
231
231
|
|
|
232
232
|
Removes records and lists that are not reachable from retained requests or
|
|
233
233
|
the release buffer.
|
|
@@ -246,7 +246,7 @@ memory-management flows.
|
|
|
246
246
|
|
|
247
247
|
> **getPendingOptimisticMask**(`entityId`, `options?`): `FieldMask` \| `null`
|
|
248
248
|
|
|
249
|
-
Defined in: [packages/fate/src/client.ts:1771](https://github.com/nkzw-tech/fate/blob/
|
|
249
|
+
Defined in: [packages/fate/src/client.ts:1771](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L1771)
|
|
250
250
|
|
|
251
251
|
#### Parameters
|
|
252
252
|
|
|
@@ -270,7 +270,7 @@ Defined in: [packages/fate/src/client.ts:1771](https://github.com/nkzw-tech/fate
|
|
|
270
270
|
|
|
271
271
|
> **getRequestKey**(`request`): `string`
|
|
272
272
|
|
|
273
|
-
Defined in: [packages/fate/src/client.ts:2366](https://github.com/nkzw-tech/fate/blob/
|
|
273
|
+
Defined in: [packages/fate/src/client.ts:2366](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L2366)
|
|
274
274
|
|
|
275
275
|
#### Parameters
|
|
276
276
|
|
|
@@ -288,7 +288,7 @@ Defined in: [packages/fate/src/client.ts:2366](https://github.com/nkzw-tech/fate
|
|
|
288
288
|
|
|
289
289
|
> **getRequestResult**\<`R`\>(`request`): [`RequestResult`](../type-aliases/RequestResult.md)\<`Roots`, `R`\>
|
|
290
290
|
|
|
291
|
-
Defined in: [packages/fate/src/client.ts:2506](https://github.com/nkzw-tech/fate/blob/
|
|
291
|
+
Defined in: [packages/fate/src/client.ts:2506](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L2506)
|
|
292
292
|
|
|
293
293
|
#### Type Parameters
|
|
294
294
|
|
|
@@ -312,7 +312,7 @@ Defined in: [packages/fate/src/client.ts:2506](https://github.com/nkzw-tech/fate
|
|
|
312
312
|
|
|
313
313
|
> **getTypeConfig**(`type`): [`TypeConfig`](../type-aliases/TypeConfig.md)
|
|
314
314
|
|
|
315
|
-
Defined in: [packages/fate/src/client.ts:737](https://github.com/nkzw-tech/fate/blob/
|
|
315
|
+
Defined in: [packages/fate/src/client.ts:737](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L737)
|
|
316
316
|
|
|
317
317
|
#### Parameters
|
|
318
318
|
|
|
@@ -330,7 +330,7 @@ Defined in: [packages/fate/src/client.ts:737](https://github.com/nkzw-tech/fate/
|
|
|
330
330
|
|
|
331
331
|
> **hydrate**(`state`, `options?`): `void`
|
|
332
332
|
|
|
333
|
-
Defined in: [packages/fate/src/client.ts:580](https://github.com/nkzw-tech/fate/blob/
|
|
333
|
+
Defined in: [packages/fate/src/client.ts:580](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L580)
|
|
334
334
|
|
|
335
335
|
Restores a durable normalized cache snapshot without restoring runtime
|
|
336
336
|
request handles, retainers, subscriptions, or optimistic update state.
|
|
@@ -356,7 +356,7 @@ Hydrate before rendering SSR content. Replaying the same snapshot is safe.
|
|
|
356
356
|
|
|
357
357
|
> **loadConnection**\<`V`\>(`view`, `connection`, `args`, `options?`): `Promise`\<`Readonly`\<\{ `backwardPageLimit?`: `number`; `cursors?`: readonly (`string` \| `undefined`)[]; `forwardPageLimit?`: `number`; `ids`: readonly `string`[]; `liveAfterIds?`: readonly `string`[]; `liveBeforeIds?`: readonly `string`[]; `pagination?`: [`Pagination`](../type-aliases/Pagination.md); `pendingAfterIds?`: readonly `string`[]; `pendingBeforeIds?`: readonly `string`[]; \}\> \| `undefined`\>
|
|
358
358
|
|
|
359
|
-
Defined in: [packages/fate/src/client.ts:1836](https://github.com/nkzw-tech/fate/blob/
|
|
359
|
+
Defined in: [packages/fate/src/client.ts:1836](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L1836)
|
|
360
360
|
|
|
361
361
|
#### Type Parameters
|
|
362
362
|
|
|
@@ -394,7 +394,7 @@ Defined in: [packages/fate/src/client.ts:1836](https://github.com/nkzw-tech/fate
|
|
|
394
394
|
|
|
395
395
|
> **prepareRequestForRender**\<`R`\>(`request`, `options`): `Readonly`\<\{ `promise`: `Promise`\<[`RequestResult`](../type-aliases/RequestResult.md)\<`Roots`, `R`\>\>; `requestKey`: `string`; \}\>
|
|
396
396
|
|
|
397
|
-
Defined in: [packages/fate/src/client.ts:2017](https://github.com/nkzw-tech/fate/blob/
|
|
397
|
+
Defined in: [packages/fate/src/client.ts:2017](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L2017)
|
|
398
398
|
|
|
399
399
|
#### Type Parameters
|
|
400
400
|
|
|
@@ -422,7 +422,7 @@ Defined in: [packages/fate/src/client.ts:2017](https://github.com/nkzw-tech/fate
|
|
|
422
422
|
|
|
423
423
|
> **readDeferred**\<`T`\>(`deferred`): `PromiseLike`\<`Readonly`\<\{ `coverage`: readonly readonly \[`string`, `ReadonlySet`\<`string`\>\][]; `data`: `T`; \}\>\>
|
|
424
424
|
|
|
425
|
-
Defined in: [packages/fate/src/client.ts:993](https://github.com/nkzw-tech/fate/blob/
|
|
425
|
+
Defined in: [packages/fate/src/client.ts:993](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L993)
|
|
426
426
|
|
|
427
427
|
#### Type Parameters
|
|
428
428
|
|
|
@@ -446,7 +446,7 @@ Defined in: [packages/fate/src/client.ts:993](https://github.com/nkzw-tech/fate/
|
|
|
446
446
|
|
|
447
447
|
> **readView**\<`T`, `S`, `V`\>(`view`, `ref`): [`FateThenable`](../interfaces/FateThenable.md)\<`Readonly`\<\{ `coverage`: readonly readonly \[`string`, `ReadonlySet`\<`string`\>\][]; `data`: [`ViewData`](../type-aliases/ViewData.md)\<`T`, `S`\>; \}\>\>
|
|
448
448
|
|
|
449
|
-
Defined in: [packages/fate/src/client.ts:866](https://github.com/nkzw-tech/fate/blob/
|
|
449
|
+
Defined in: [packages/fate/src/client.ts:866](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L866)
|
|
450
450
|
|
|
451
451
|
#### Type Parameters
|
|
452
452
|
|
|
@@ -482,7 +482,7 @@ Defined in: [packages/fate/src/client.ts:866](https://github.com/nkzw-tech/fate/
|
|
|
482
482
|
|
|
483
483
|
> **ref**\<`T`\>(`type`, `id`, `view`): [`ViewRef`](../type-aliases/ViewRef.md)\<`T`\[`"__typename"`\]\>
|
|
484
484
|
|
|
485
|
-
Defined in: [packages/fate/src/client.ts:853](https://github.com/nkzw-tech/fate/blob/
|
|
485
|
+
Defined in: [packages/fate/src/client.ts:853](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L853)
|
|
486
486
|
|
|
487
487
|
#### Type Parameters
|
|
488
488
|
|
|
@@ -514,7 +514,7 @@ Defined in: [packages/fate/src/client.ts:853](https://github.com/nkzw-tech/fate/
|
|
|
514
514
|
|
|
515
515
|
> **registerOptimisticUpdate**(`entityId`, `select`): `number` \| `null`
|
|
516
516
|
|
|
517
|
-
Defined in: [packages/fate/src/client.ts:1730](https://github.com/nkzw-tech/fate/blob/
|
|
517
|
+
Defined in: [packages/fate/src/client.ts:1730](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L1730)
|
|
518
518
|
|
|
519
519
|
#### Parameters
|
|
520
520
|
|
|
@@ -536,7 +536,7 @@ Defined in: [packages/fate/src/client.ts:1730](https://github.com/nkzw-tech/fate
|
|
|
536
536
|
|
|
537
537
|
> **registerPendingOptimisticMutation**(`entityId`, `promise`): `void`
|
|
538
538
|
|
|
539
|
-
Defined in: [packages/fate/src/client.ts:1700](https://github.com/nkzw-tech/fate/blob/
|
|
539
|
+
Defined in: [packages/fate/src/client.ts:1700](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L1700)
|
|
540
540
|
|
|
541
541
|
#### Parameters
|
|
542
542
|
|
|
@@ -558,7 +558,7 @@ Defined in: [packages/fate/src/client.ts:1700](https://github.com/nkzw-tech/fate
|
|
|
558
558
|
|
|
559
559
|
> **releaseRequest**(`request`, `mode`): `void`
|
|
560
560
|
|
|
561
|
-
Defined in: [packages/fate/src/client.ts:2074](https://github.com/nkzw-tech/fate/blob/
|
|
561
|
+
Defined in: [packages/fate/src/client.ts:2074](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L2074)
|
|
562
562
|
|
|
563
563
|
#### Parameters
|
|
564
564
|
|
|
@@ -580,7 +580,7 @@ Defined in: [packages/fate/src/client.ts:2074](https://github.com/nkzw-tech/fate
|
|
|
580
580
|
|
|
581
581
|
> **releaseRequestKey**(`requestKey`, `mode`): `void`
|
|
582
582
|
|
|
583
|
-
Defined in: [packages/fate/src/client.ts:2078](https://github.com/nkzw-tech/fate/blob/
|
|
583
|
+
Defined in: [packages/fate/src/client.ts:2078](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L2078)
|
|
584
584
|
|
|
585
585
|
#### Parameters
|
|
586
586
|
|
|
@@ -602,7 +602,7 @@ Defined in: [packages/fate/src/client.ts:2078](https://github.com/nkzw-tech/fate
|
|
|
602
602
|
|
|
603
603
|
> **request**\<`R`\>(`request`, `options?`): `Promise`\<[`RequestResult`](../type-aliases/RequestResult.md)\<`Roots`, `R`\>\>
|
|
604
604
|
|
|
605
|
-
Defined in: [packages/fate/src/client.ts:2000](https://github.com/nkzw-tech/fate/blob/
|
|
605
|
+
Defined in: [packages/fate/src/client.ts:2000](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L2000)
|
|
606
606
|
|
|
607
607
|
#### Type Parameters
|
|
608
608
|
|
|
@@ -630,7 +630,7 @@ Defined in: [packages/fate/src/client.ts:2000](https://github.com/nkzw-tech/fate
|
|
|
630
630
|
|
|
631
631
|
> **requestForRender**\<`R`\>(`request`, `options?`): `Promise`\<[`RequestResult`](../type-aliases/RequestResult.md)\<`Roots`, `R`\>\>
|
|
632
632
|
|
|
633
|
-
Defined in: [packages/fate/src/client.ts:2010](https://github.com/nkzw-tech/fate/blob/
|
|
633
|
+
Defined in: [packages/fate/src/client.ts:2010](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L2010)
|
|
634
634
|
|
|
635
635
|
#### Type Parameters
|
|
636
636
|
|
|
@@ -658,7 +658,7 @@ Defined in: [packages/fate/src/client.ts:2010](https://github.com/nkzw-tech/fate
|
|
|
658
658
|
|
|
659
659
|
> **resolveOptimisticEntity**(`optimisticEntityId`, `resolvedEntityId`): `void`
|
|
660
660
|
|
|
661
|
-
Defined in: [packages/fate/src/client.ts:1725](https://github.com/nkzw-tech/fate/blob/
|
|
661
|
+
Defined in: [packages/fate/src/client.ts:1725](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L1725)
|
|
662
662
|
|
|
663
663
|
#### Parameters
|
|
664
664
|
|
|
@@ -680,7 +680,7 @@ Defined in: [packages/fate/src/client.ts:1725](https://github.com/nkzw-tech/fate
|
|
|
680
680
|
|
|
681
681
|
> **restore**(`id`, `snapshot`): `void`
|
|
682
682
|
|
|
683
|
-
Defined in: [packages/fate/src/client.ts:821](https://github.com/nkzw-tech/fate/blob/
|
|
683
|
+
Defined in: [packages/fate/src/client.ts:821](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L821)
|
|
684
684
|
|
|
685
685
|
#### Parameters
|
|
686
686
|
|
|
@@ -702,7 +702,7 @@ Defined in: [packages/fate/src/client.ts:821](https://github.com/nkzw-tech/fate/
|
|
|
702
702
|
|
|
703
703
|
> **restoreList**(`name`, `list?`): `void`
|
|
704
704
|
|
|
705
|
-
Defined in: [packages/fate/src/client.ts:826](https://github.com/nkzw-tech/fate/blob/
|
|
705
|
+
Defined in: [packages/fate/src/client.ts:826](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L826)
|
|
706
706
|
|
|
707
707
|
#### Parameters
|
|
708
708
|
|
|
@@ -724,7 +724,7 @@ Defined in: [packages/fate/src/client.ts:826](https://github.com/nkzw-tech/fate/
|
|
|
724
724
|
|
|
725
725
|
> **retain**(`request`): `RetainHandle`
|
|
726
726
|
|
|
727
|
-
Defined in: [packages/fate/src/client.ts:2109](https://github.com/nkzw-tech/fate/blob/
|
|
727
|
+
Defined in: [packages/fate/src/client.ts:2109](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L2109)
|
|
728
728
|
|
|
729
729
|
Keeps the records and lists reachable from a request alive until the
|
|
730
730
|
returned handle is disposed.
|
|
@@ -749,7 +749,7 @@ that must survive manual garbage collection.
|
|
|
749
749
|
|
|
750
750
|
> **retainRequestKey**(`requestKey`, `mode?`): `RetainHandle`
|
|
751
751
|
|
|
752
|
-
Defined in: [packages/fate/src/client.ts:2090](https://github.com/nkzw-tech/fate/blob/
|
|
752
|
+
Defined in: [packages/fate/src/client.ts:2090](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L2090)
|
|
753
753
|
|
|
754
754
|
#### Parameters
|
|
755
755
|
|
|
@@ -771,7 +771,7 @@ Defined in: [packages/fate/src/client.ts:2090](https://github.com/nkzw-tech/fate
|
|
|
771
771
|
|
|
772
772
|
> **rootListRef**(`entityId`, `rootView`): `Readonly`\<\{ `__typename`: `string`; `[ViewsTag]`: `Set`\<`string`\>; `id`: `string` \| `number`; \}\>
|
|
773
773
|
|
|
774
|
-
Defined in: [packages/fate/src/client.ts:861](https://github.com/nkzw-tech/fate/blob/
|
|
774
|
+
Defined in: [packages/fate/src/client.ts:861](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L861)
|
|
775
775
|
|
|
776
776
|
#### Parameters
|
|
777
777
|
|
|
@@ -793,7 +793,7 @@ Defined in: [packages/fate/src/client.ts:861](https://github.com/nkzw-tech/fate/
|
|
|
793
793
|
|
|
794
794
|
> **subscribeLiveListView**\<`V`\>(`view`, `connection`): () => `void`
|
|
795
795
|
|
|
796
|
-
Defined in: [packages/fate/src/client.ts:1190](https://github.com/nkzw-tech/fate/blob/
|
|
796
|
+
Defined in: [packages/fate/src/client.ts:1190](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L1190)
|
|
797
797
|
|
|
798
798
|
#### Type Parameters
|
|
799
799
|
|
|
@@ -821,7 +821,7 @@ Defined in: [packages/fate/src/client.ts:1190](https://github.com/nkzw-tech/fate
|
|
|
821
821
|
|
|
822
822
|
> **subscribeLiveView**\<`T`, `S`, `V`\>(`view`, `ref`): () => `void`
|
|
823
823
|
|
|
824
|
-
Defined in: [packages/fate/src/client.ts:1106](https://github.com/nkzw-tech/fate/blob/
|
|
824
|
+
Defined in: [packages/fate/src/client.ts:1106](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L1106)
|
|
825
825
|
|
|
826
826
|
#### Type Parameters
|
|
827
827
|
|
|
@@ -857,7 +857,7 @@ Defined in: [packages/fate/src/client.ts:1106](https://github.com/nkzw-tech/fate
|
|
|
857
857
|
|
|
858
858
|
> **trackPendingRequest**\<`T`\>(`request`): `Promise`\<`T`\>
|
|
859
859
|
|
|
860
|
-
Defined in: [packages/fate/src/client.ts:2323](https://github.com/nkzw-tech/fate/blob/
|
|
860
|
+
Defined in: [packages/fate/src/client.ts:2323](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L2323)
|
|
861
861
|
|
|
862
862
|
#### Type Parameters
|
|
863
863
|
|
|
@@ -881,7 +881,7 @@ Defined in: [packages/fate/src/client.ts:2323](https://github.com/nkzw-tech/fate
|
|
|
881
881
|
|
|
882
882
|
> **write**(`type`, `data`, `select`, `snapshots?`, `plan?`, `pathPrefix?`, `blockedMask?`, `insert?`, `listSnapshots?`): `string`
|
|
883
883
|
|
|
884
|
-
Defined in: [packages/fate/src/client.ts:779](https://github.com/nkzw-tech/fate/blob/
|
|
884
|
+
Defined in: [packages/fate/src/client.ts:779](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L779)
|
|
885
885
|
|
|
886
886
|
#### Parameters
|
|
887
887
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **clientRoot**\<`Result`, `Type`\>(`type`): `RootDefinition`\<`Type`, `Result`\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/fate/src/root.ts:7](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [packages/fate/src/root.ts:7](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/root.ts#L7)
|
|
6
6
|
|
|
7
7
|
Defines a root query for an entity type, capturing the response shape.
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **createClient**\<`T`, `HydrationScope`\>(`options`): [`FateClient`](../classes/FateClient.md)\<`T`\[`0`\], `T`\[`1`\], `HydrationScope`\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/fate/src/client.ts:3377](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [packages/fate/src/client.ts:3377](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/client.ts#L3377)
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **createGraphQLTransport**\<`Mutations`\>(`__namedParameters`): [`Transport`](../interfaces/Transport.md)\<`Mutations`\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/fate/src/graphqlTransport.ts:578](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [packages/fate/src/graphqlTransport.ts:578](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/graphqlTransport.ts#L578)
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **createHTTPTransport**\<`API`, `Mutations`\>(`__namedParameters`): [`Transport`](../interfaces/Transport.md)\<`Mutations`\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/fate/src/httpTransport.ts:265](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [packages/fate/src/httpTransport.ts:265](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/httpTransport.ts#L265)
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **createTRPCTransport**\<`AppRouter`, `Mutations`\>(`__namedParameters`): [`Transport`](../interfaces/Transport.md)\<`MutationMapFromResolvers`\<`Mutations`\>\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/fate/src/transport.ts:149](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [packages/fate/src/transport.ts:149](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/transport.ts#L149)
|
|
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
|
> **defer**\<`S`\>(`selection`): [`DeferredSelection`](../type-aliases/DeferredSelection.md)\<`S`\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/fate/src/defer.ts:9](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [packages/fate/src/defer.ts:9](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/defer.ts#L9)
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **getDeferredMetadata**\<`T`\>(`deferred`): [`DeferredMetadata`](../type-aliases/DeferredMetadata.md)
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/fate/src/defer.ts:28](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [packages/fate/src/defer.ts:28](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/defer.ts#L28)
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **getListEntries**(`listState`): `Readonly`\<\{ `cursor?`: `string`; `id`: `string`; \}\>[]
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/fate/src/list.ts:6](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [packages/fate/src/list.ts:6](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/list.ts#L6)
|
|
6
6
|
|
|
7
7
|
## Parameters
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **getSelectionPlan**\<`T`, `S`, `V`\>(`viewComposition`, `ref`): `SelectionPlan`
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/fate/src/selection.ts:38](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [packages/fate/src/selection.ts:38](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/selection.ts#L38)
|
|
6
6
|
|
|
7
7
|
Flattens a view into a `SelectionPlan`, expanding composed views and
|
|
8
8
|
partitioning nested args so the client can fetch exactly what is declared.
|
|
@@ -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/src/graphqlTransport.ts:567](https://github.com/nkzw-tech/fate/blob/
|
|
5
|
+
Defined in: [packages/fate/src/graphqlTransport.ts:567](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/graphqlTransport.ts#L567)
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|