@nkzw/fate 1.3.1 → 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.
Files changed (171) hide show
  1. package/docs/api/classes/FateClient.md +40 -40
  2. package/docs/api/functions/clientRoot.md +1 -1
  3. package/docs/api/functions/createClient.md +1 -1
  4. package/docs/api/functions/createGraphQLTransport.md +1 -1
  5. package/docs/api/functions/createHTTPTransport.md +1 -1
  6. package/docs/api/functions/createTRPCTransport.md +1 -1
  7. package/docs/api/functions/defer.md +1 -1
  8. package/docs/api/functions/getDeferredMetadata.md +1 -1
  9. package/docs/api/functions/getListEntries.md +1 -1
  10. package/docs/api/functions/getSelectionPlan.md +1 -1
  11. package/docs/api/functions/graphqlMutation.md +1 -1
  12. package/docs/api/functions/isDeferred.md +1 -1
  13. package/docs/api/functions/isRecord.md +1 -1
  14. package/docs/api/functions/isViewTag.md +1 -1
  15. package/docs/api/functions/liveConnectionTopic.md +1 -1
  16. package/docs/api/functions/liveEntityTopic.md +1 -1
  17. package/docs/api/functions/liveGlobalConnectionTopic.md +1 -1
  18. package/docs/api/functions/mutation.md +1 -1
  19. package/docs/api/functions/toEntityId.md +1 -1
  20. package/docs/api/functions/view.md +1 -1
  21. package/docs/api/interfaces/FateThenable.md +3 -3
  22. package/docs/api/interfaces/Transport.md +7 -7
  23. package/docs/api/server/classes/FateRequestError.md +5 -5
  24. package/docs/api/server/drizzle/functions/createDrizzleFate.md +1 -1
  25. package/docs/api/server/drizzle/functions/createDrizzleSourceAdapter.md +1 -1
  26. package/docs/api/server/drizzle/functions/createDrizzleSourceRegistry.md +1 -1
  27. package/docs/api/server/drizzle/type-aliases/DrizzleManyToManyConfig.md +1 -1
  28. package/docs/api/server/drizzle/type-aliases/DrizzleManyToManyInput.md +1 -1
  29. package/docs/api/server/drizzle/type-aliases/DrizzleQueryExtra.md +3 -3
  30. package/docs/api/server/drizzle/type-aliases/DrizzleSourceAdapter.md +9 -9
  31. package/docs/api/server/drizzle/type-aliases/DrizzleViewConfig.md +1 -1
  32. package/docs/api/server/functions/bindSourceProcedures.md +1 -1
  33. package/docs/api/server/functions/computed.md +1 -1
  34. package/docs/api/server/functions/count.md +1 -1
  35. package/docs/api/server/functions/createFateFetchHandler.md +1 -1
  36. package/docs/api/server/functions/createFateServer.md +1 -1
  37. package/docs/api/server/functions/createHonoFateHandler.md +1 -1
  38. package/docs/api/server/functions/createLiveEventBus.md +1 -1
  39. package/docs/api/server/functions/createNestedSourcePlan.md +1 -1
  40. package/docs/api/server/functions/createResolver.md +1 -1
  41. package/docs/api/server/functions/createSourcePlan.md +1 -1
  42. package/docs/api/server/functions/createSourceProcedures.md +1 -1
  43. package/docs/api/server/functions/dataView.md +1 -1
  44. package/docs/api/server/functions/field.md +1 -1
  45. package/docs/api/server/functions/getNestedSelection.md +1 -1
  46. package/docs/api/server/functions/getScopedArgs.md +1 -1
  47. package/docs/api/server/functions/hasNestedSelection.md +1 -1
  48. package/docs/api/server/functions/list.md +1 -1
  49. package/docs/api/server/functions/refetchSourceById.md +1 -1
  50. package/docs/api/server/functions/resolveSourceById.md +1 -1
  51. package/docs/api/server/functions/resolveSourceByIds.md +1 -1
  52. package/docs/api/server/functions/resolveSourceConnection.md +1 -1
  53. package/docs/api/server/functions/resolver.md +1 -1
  54. package/docs/api/server/functions/toPrismaSelect.md +1 -1
  55. package/docs/api/server/functions/withConnection.md +1 -1
  56. package/docs/api/server/prisma/functions/createPrismaFate.md +1 -1
  57. package/docs/api/server/prisma/functions/createPrismaSourceAdapter.md +1 -1
  58. package/docs/api/server/prisma/functions/createPrismaSourceRegistry.md +1 -1
  59. package/docs/api/server/prisma/functions/prismaConnectionArgs.md +1 -1
  60. package/docs/api/server/prisma/type-aliases/PrismaDelegate.md +4 -4
  61. package/docs/api/server/prisma/type-aliases/PrismaQueryExtra.md +1 -1
  62. package/docs/api/server/prisma/type-aliases/PrismaSourceAdapter.md +9 -9
  63. package/docs/api/server/prisma/type-aliases/PrismaViewConfig.md +1 -1
  64. package/docs/api/server/type-aliases/ComputedField.md +5 -5
  65. package/docs/api/server/type-aliases/ComputedSelection.md +1 -1
  66. package/docs/api/server/type-aliases/ConnectionItem.md +3 -3
  67. package/docs/api/server/type-aliases/ConnectionPagination.md +5 -5
  68. package/docs/api/server/type-aliases/ConnectionResult.md +3 -3
  69. package/docs/api/server/type-aliases/CountSelection.md +4 -4
  70. package/docs/api/server/type-aliases/CountWhere.md +1 -1
  71. package/docs/api/server/type-aliases/DataViewListOptions.md +2 -2
  72. package/docs/api/server/type-aliases/DataViewOrderBy.md +1 -1
  73. package/docs/api/server/type-aliases/DataViewOrderDirection.md +1 -1
  74. package/docs/api/server/type-aliases/DataViewResult.md +1 -1
  75. package/docs/api/server/type-aliases/Entity.md +1 -1
  76. package/docs/api/server/type-aliases/FateServer.md +5 -5
  77. package/docs/api/server/type-aliases/FateServerManifest.md +1 -1
  78. package/docs/api/server/type-aliases/FieldSelection.md +3 -3
  79. package/docs/api/server/type-aliases/LiveConnectionEventType.md +1 -1
  80. package/docs/api/server/type-aliases/LiveConnectionSourceEvent.md +1 -1
  81. package/docs/api/server/type-aliases/LiveEventBus.md +1 -1
  82. package/docs/api/server/type-aliases/LiveEventType.md +1 -1
  83. package/docs/api/server/type-aliases/LiveSourceEvent.md +1 -1
  84. package/docs/api/server/type-aliases/NativeFateAPI.md +4 -4
  85. package/docs/api/server/type-aliases/OrderDirection.md +1 -1
  86. package/docs/api/server/type-aliases/SourceConfig.md +6 -6
  87. package/docs/api/server/type-aliases/SourceDefinition.md +6 -6
  88. package/docs/api/server/type-aliases/SourceOrder.md +1 -1
  89. package/docs/api/server/type-aliases/SourceOrderField.md +3 -3
  90. package/docs/api/server/type-aliases/SourcePlan.md +1 -1
  91. package/docs/api/server/type-aliases/SourcePlanNode.md +1 -1
  92. package/docs/api/server/type-aliases/SourceRegistry.md +1 -1
  93. package/docs/api/server/type-aliases/SourceRelation.md +1 -1
  94. package/docs/api/server/type-aliases/SourceRelationConfig.md +1 -1
  95. package/docs/api/server/variables/byIdInput.md +1 -1
  96. package/docs/api/server/variables/connectionArgs.md +1 -1
  97. package/docs/api/type-aliases/ConnectionMetadata.md +1 -1
  98. package/docs/api/type-aliases/ConnectionRef.md +1 -1
  99. package/docs/api/type-aliases/Deferred.md +1 -1
  100. package/docs/api/type-aliases/DeferredMetadata.md +1 -1
  101. package/docs/api/type-aliases/DeferredSelection.md +1 -1
  102. package/docs/api/type-aliases/DeferredSnapshot.md +1 -1
  103. package/docs/api/type-aliases/Entity.md +2 -2
  104. package/docs/api/type-aliases/EntityId.md +1 -1
  105. package/docs/api/type-aliases/FateDehydratedState.md +1 -1
  106. package/docs/api/type-aliases/FateLiveConnectionEvent.md +1 -1
  107. package/docs/api/type-aliases/FateLiveEvent.md +1 -1
  108. package/docs/api/type-aliases/FateMutations.md +1 -1
  109. package/docs/api/type-aliases/FateOperation.md +1 -1
  110. package/docs/api/type-aliases/FateProtocolRequest.md +1 -1
  111. package/docs/api/type-aliases/FateProtocolResponse.md +1 -1
  112. package/docs/api/type-aliases/FateRecord.md +1 -1
  113. package/docs/api/type-aliases/FateRoots.md +1 -1
  114. package/docs/api/type-aliases/GraphQLMutationDefinition.md +1 -1
  115. package/docs/api/type-aliases/GraphQLMutationInput.md +1 -1
  116. package/docs/api/type-aliases/GraphQLMutationMap.md +1 -1
  117. package/docs/api/type-aliases/GraphQLMutationOutput.md +1 -1
  118. package/docs/api/type-aliases/GraphQLTransportOptions.md +11 -11
  119. package/docs/api/type-aliases/HydrateOptions.md +1 -1
  120. package/docs/api/type-aliases/HydrationLimits.md +1 -1
  121. package/docs/api/type-aliases/InferFateAPI.md +1 -1
  122. package/docs/api/type-aliases/List.md +1 -1
  123. package/docs/api/type-aliases/ListEntry.md +1 -1
  124. package/docs/api/type-aliases/ListItem.md +1 -1
  125. package/docs/api/type-aliases/Mask.md +1 -1
  126. package/docs/api/type-aliases/MutationDefinition.md +1 -1
  127. package/docs/api/type-aliases/MutationEntity.md +1 -1
  128. package/docs/api/type-aliases/MutationIdentifier.md +1 -1
  129. package/docs/api/type-aliases/MutationInput.md +1 -1
  130. package/docs/api/type-aliases/MutationResult.md +1 -1
  131. package/docs/api/type-aliases/NodesItem.md +1 -1
  132. package/docs/api/type-aliases/Pagination.md +5 -5
  133. package/docs/api/type-aliases/Request.md +1 -1
  134. package/docs/api/type-aliases/RequestMode.md +1 -1
  135. package/docs/api/type-aliases/RequestOptions.md +1 -1
  136. package/docs/api/type-aliases/RequestResult.md +1 -1
  137. package/docs/api/type-aliases/Selection.md +1 -1
  138. package/docs/api/type-aliases/Snapshot.md +1 -1
  139. package/docs/api/type-aliases/TypeConfig.md +4 -4
  140. package/docs/api/type-aliases/View.md +1 -1
  141. package/docs/api/type-aliases/ViewData.md +1 -1
  142. package/docs/api/type-aliases/ViewEntity.md +1 -1
  143. package/docs/api/type-aliases/ViewEntityName.md +1 -1
  144. package/docs/api/type-aliases/ViewRef.md +1 -1
  145. package/docs/api/type-aliases/ViewSelection.md +1 -1
  146. package/docs/api/type-aliases/ViewSnapshot.md +1 -1
  147. package/docs/api/type-aliases/ViewTag.md +1 -1
  148. package/docs/api/variables/ConnectionTag.md +1 -1
  149. package/docs/api/variables/DeferTag.md +1 -1
  150. package/docs/api/variables/DeferredTag.md +1 -1
  151. package/lib/{executor-Dh-MLUXc.d.mts → executor-C8HNogYG.d.mts} +1 -1
  152. package/lib/{graphqlTransport-IFgmY-Qq.mjs → graphqlTransport-DSBVS2Fq.mjs} +20 -15
  153. package/lib/{graphqlTransport-B3cbhvJX.d.mts → graphqlTransport-DskuXeUP.d.mts} +1 -1
  154. package/lib/graphqlTransport.d.mts +1 -1
  155. package/lib/graphqlTransport.mjs +1 -1
  156. package/lib/index.d.mts +4 -4
  157. package/lib/index.mjs +36 -25
  158. package/lib/{list-BrL6PD_6.d.mts → list-sI2UPhHc.d.mts} +1 -1
  159. package/lib/list.d.mts +1 -1
  160. package/lib/{liveTopics-JIDh3t3P.mjs → liveTopics-uVP0LG-Q.mjs} +1 -1
  161. package/lib/{record-BkvZwvFk.d.mts → record-CZyyeLa3.d.mts} +2 -2
  162. package/lib/server/drizzle.d.mts +2 -2
  163. package/lib/server/drizzle.mjs +43 -31
  164. package/lib/server/prisma.d.mts +2 -2
  165. package/lib/server/prisma.mjs +10 -8
  166. package/lib/server.d.mts +3 -3
  167. package/lib/server.mjs +23 -20
  168. package/lib/{sourceRouter-N9Vp0Cj6.mjs → sourceRouter-DSaADXSf.mjs} +8 -4
  169. package/lib/{transport-BjGm__3t.d.mts → transport-DhaVVq4P.d.mts} +3 -2
  170. package/lib/vite.mjs +6 -5
  171. package/package.json +4 -4
@@ -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: [packages/fate/src/types.ts:424](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L424)
5
+ Defined in: [packages/fate/src/types.ts:424](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L424)
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: [packages/fate/src/types.ts:229](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L229)
5
+ Defined in: [packages/fate/src/types.ts:229](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L229)
6
6
 
7
7
  Declarative selection of the fields a view needs from an entity.
8
8
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  > **Snapshot** = `Readonly`\<\{ `mask?`: `FieldMask`; `record?`: [`FateRecord`](FateRecord.md); \}\>
4
4
 
5
- Defined in: [packages/fate/src/types.ts:513](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L513)
5
+ Defined in: [packages/fate/src/types.ts:513](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L513)
6
6
 
7
7
  Snapshot captured before mutating the cache, used to roll back on errors.
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **TypeConfig** = `object`
4
4
 
5
- Defined in: [packages/fate/src/types.ts:124](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L124)
5
+ Defined in: [packages/fate/src/types.ts:124](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L124)
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: [packages/fate/src/types.ts:125](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L125)
15
+ Defined in: [packages/fate/src/types.ts:125](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L125)
16
16
 
17
17
  ***
18
18
 
@@ -20,7 +20,7 @@ Defined in: [packages/fate/src/types.ts:125](https://github.com/nkzw-tech/fate/b
20
20
 
21
21
  > **getId**: (`record`) => `string` \| `number`
22
22
 
23
- Defined in: [packages/fate/src/types.ts:126](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L126)
23
+ Defined in: [packages/fate/src/types.ts:126](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L126)
24
24
 
25
25
  #### Parameters
26
26
 
@@ -38,4 +38,4 @@ Defined in: [packages/fate/src/types.ts:126](https://github.com/nkzw-tech/fate/b
38
38
 
39
39
  > **type**: `string`
40
40
 
41
- Defined in: [packages/fate/src/types.ts:127](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L127)
41
+ Defined in: [packages/fate/src/types.ts:127](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L127)
@@ -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: [packages/fate/src/types.ts:245](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L245)
5
+ Defined in: [packages/fate/src/types.ts:245](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L245)
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: [packages/fate/src/types.ts:261](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L261)
5
+ Defined in: [packages/fate/src/types.ts:261](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L261)
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: [packages/fate/src/types.ts:335](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L335)
5
+ Defined in: [packages/fate/src/types.ts:335](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L335)
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: [packages/fate/src/types.ts:338](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L338)
5
+ Defined in: [packages/fate/src/types.ts:338](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L338)
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: [packages/fate/src/types.ts:108](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L108)
5
+ Defined in: [packages/fate/src/types.ts:108](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L108)
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: [packages/fate/src/types.ts:341](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L341)
5
+ Defined in: [packages/fate/src/types.ts:341](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L341)
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: [packages/fate/src/types.ts:271](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L271)
5
+ Defined in: [packages/fate/src/types.ts:271](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L271)
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: [packages/fate/src/types.ts:56](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L56)
5
+ Defined in: [packages/fate/src/types.ts:56](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L56)
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: [packages/fate/src/types.ts:20](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L20)
5
+ Defined in: [packages/fate/src/types.ts:20](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L20)
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: [packages/fate/src/types.ts:23](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L23)
5
+ Defined in: [packages/fate/src/types.ts:23](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L23)
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: [packages/fate/src/types.ts:26](https://github.com/nkzw-tech/fate/blob/bdff68417591ff0372c03c214bbc7c722cdf13a2/packages/fate/src/types.ts#L26)
5
+ Defined in: [packages/fate/src/types.ts:26](https://github.com/nkzw-tech/fate/blob/49490f5c07a65b981b4781ddf0441d15ad01b5ab/packages/fate/src/types.ts#L26)
6
6
 
7
7
  Symbol attached to deferred values returned from masked views.
@@ -1,4 +1,4 @@
1
- import { r as AnyRecord, rt as QueryProcedure } from "./transport-BjGm__3t.mjs";
1
+ import { r as AnyRecord, rt as QueryProcedure } from "./transport-DhaVVq4P.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/server/dataView.d.ts
@@ -82,10 +82,11 @@ const getTypeConfig = (types, type) => {
82
82
  const rootArgsToGraphQL = ({ args, type, types }) => {
83
83
  if (!args) return "";
84
84
  const fields = getTypeConfig(types, type).fields ?? {};
85
- return argsToGraphQL(Object.fromEntries(Object.entries(args).filter(([key]) => {
85
+ const rootArgs = Object.fromEntries(Object.entries(args).filter(([key]) => {
86
86
  const descriptor = fields[key];
87
87
  return !(descriptor && typeof descriptor === "object" && ("listOf" in descriptor || "type" in descriptor));
88
- })));
88
+ }));
89
+ return argsToGraphQL(rootArgs);
89
90
  };
90
91
  const buildSelectionTree = (select) => {
91
92
  const root = /* @__PURE__ */ new Map();
@@ -107,7 +108,7 @@ const buildRecordSelection = ({ args, path, select, type, types }) => {
107
108
  const tree = buildSelectionTree(select);
108
109
  const walk = (currentType, currentTree, currentPath) => {
109
110
  const config = getTypeConfig(types, currentType);
110
- const fields = new Set([
111
+ const fields = /* @__PURE__ */ new Set([
111
112
  ...currentTree.keys(),
112
113
  "id",
113
114
  "__typename"
@@ -321,13 +322,14 @@ function createGraphQLTransport({ decodeNodeId = defaultDecodeNodeId, encodeNode
321
322
  type: root.type,
322
323
  types
323
324
  });
325
+ const rootArgs = rootArgsToGraphQL({
326
+ args,
327
+ type: root.type,
328
+ types
329
+ });
324
330
  return enqueue({
325
331
  kind: "query",
326
- selection: `${field}${rootArgsToGraphQL({
327
- args,
328
- type: root.type,
329
- types
330
- })} { edges { cursor node { ${selection} } } pageInfo { endCursor hasNextPage hasPreviousPage startCursor } }`,
332
+ selection: `${field}${rootArgs} { edges { cursor node { ${selection} } } pageInfo { endCursor hasNextPage hasPreviousPage startCursor } }`,
331
333
  transform: (value) => normalizeGraphQLValue({
332
334
  decodeNodeId,
333
335
  type: root.type,
@@ -347,13 +349,14 @@ function createGraphQLTransport({ decodeNodeId = defaultDecodeNodeId, encodeNode
347
349
  type: root.type,
348
350
  types
349
351
  });
352
+ const rootArgs = rootArgsToGraphQL({
353
+ args,
354
+ type: root.type,
355
+ types
356
+ });
350
357
  return enqueue({
351
358
  kind: "query",
352
- selection: `${field}${rootArgsToGraphQL({
353
- args,
354
- type: root.type,
355
- types
356
- })} { ${selection} }`,
359
+ selection: `${field}${rootArgs} { ${selection} }`,
357
360
  transform: (value) => normalizeGraphQLValue({
358
361
  decodeNodeId,
359
362
  type: root.type,
@@ -424,7 +427,8 @@ function createGraphQLTransport({ decodeNodeId = defaultDecodeNodeId, encodeNode
424
427
  };
425
428
  transport.subscribeById = (type, id, select, args, handlers) => {
426
429
  const field = assertIdentifier(liveOptions.entityField ?? "fateLiveNode", "subscription");
427
- return subscribeLive(`subscription FateLiveNode { ${field}(type: ${graphQLLiteral(type)}, id: ${graphQLLiteral(encodeNodeId(type, id))}, select: ${graphQLLiteral([...select])}, args: ${graphQLLiteral(args ?? null)}) { data delete id select } }`, {
430
+ const query = `subscription FateLiveNode { ${field}(type: ${graphQLLiteral(type)}, id: ${graphQLLiteral(encodeNodeId(type, id))}, select: ${graphQLLiteral([...select])}, args: ${graphQLLiteral(args ?? null)}) { data delete id select } }`;
431
+ return subscribeLive(query, {
428
432
  complete() {},
429
433
  error: (error) => handlers.onError?.(error),
430
434
  next(result) {
@@ -451,7 +455,8 @@ function createGraphQLTransport({ decodeNodeId = defaultDecodeNodeId, encodeNode
451
455
  };
452
456
  transport.subscribeConnection = (procedure, type, args, select, selectionArgs, handlers) => {
453
457
  const field = assertIdentifier(liveOptions.connectionField ?? "fateLiveConnection", "subscription");
454
- return subscribeLive(`subscription FateLiveConnection { ${field}(procedure: ${graphQLLiteral(procedure)}, type: ${graphQLLiteral(type)}, args: ${graphQLLiteral(args ?? null)}, select: ${graphQLLiteral([...select])}, selectionArgs: ${graphQLLiteral(selectionArgs ?? null)}) { cursor id node nodeType targetCursor type } }`, {
458
+ const query = `subscription FateLiveConnection { ${field}(procedure: ${graphQLLiteral(procedure)}, type: ${graphQLLiteral(type)}, args: ${graphQLLiteral(args ?? null)}, select: ${graphQLLiteral([...select])}, selectionArgs: ${graphQLLiteral(selectionArgs ?? null)}) { cursor id node nodeType targetCursor type } }`;
459
+ return subscribeLive(query, {
455
460
  complete() {},
456
461
  error: (error) => handlers.onError?.(error),
457
462
  next(result) {
@@ -1,4 +1,4 @@
1
- import { C as MutationShape, f as Entity, j as TypeConfig, t as Transport } from "./transport-BjGm__3t.mjs";
1
+ import { C as MutationShape, f as Entity, j as TypeConfig, t as Transport } from "./transport-DhaVVq4P.mjs";
2
2
 
3
3
  //#region src/graphqlTransport.d.ts
4
4
  type TransportMutations = Record<string, MutationShape>;
@@ -1,2 +1,2 @@
1
- import { a as GraphQLTransportOptions, i as GraphQLMutationOutput, n as GraphQLMutationInput, o as createGraphQLTransport, r as GraphQLMutationMap, s as graphqlMutation, t as GraphQLMutationDefinition } from "./graphqlTransport-B3cbhvJX.mjs";
1
+ import { a as GraphQLTransportOptions, i as GraphQLMutationOutput, n as GraphQLMutationInput, o as createGraphQLTransport, r as GraphQLMutationMap, s as graphqlMutation, t as GraphQLMutationDefinition } from "./graphqlTransport-DskuXeUP.mjs";
2
2
  export { GraphQLMutationDefinition, GraphQLMutationInput, GraphQLMutationMap, GraphQLMutationOutput, GraphQLTransportOptions, createGraphQLTransport, graphqlMutation };
@@ -1,2 +1,2 @@
1
- import { n as graphqlMutation, t as createGraphQLTransport } from "./graphqlTransport-IFgmY-Qq.mjs";
1
+ import { n as graphqlMutation, t as createGraphQLTransport } from "./graphqlTransport-DSBVS2Fq.mjs";
2
2
  export { createGraphQLTransport, graphqlMutation };
package/lib/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { $ as HydrateOptions, A as Snapshot, B as ViewTag, C as MutationShape, D as RequestResult, E as Request$1, F as ViewEntity, G as mutation, H as __FateSelectionBrand, I as ViewEntityName, J as RequestMode, K as DeferredSnapshot, L as ViewRef, M as TypeName, N as View, O as RootDefinition, P as ViewData, Q as FateDehydratedState, R as ViewSelection, S as MutationResult, T as Pagination, U as isViewTag, V as __FateEntityBrand, W as FateMutations, X as createClient, Y as RequestOptions, Z as getSelectionPlan, _ as Mask, a as ConnectionRef, b as MutationIdentifier, c as Deferred, d as DeferredTag, et as HydrationLimits, f as Entity, g as ListItem, h as FateThenable, i as ConnectionMetadata, j as TypeConfig, k as Selection, l as DeferredMetadata, m as FateRoots, n as createTRPCTransport, o as ConnectionTag, p as EntityId, q as FateClient, r as AnyRecord, s as DeferTag, t as Transport, tt as List, u as DeferredSelection, v as MutationDefinition, w as NodesItem, x as MutationInput, y as MutationEntity, z as ViewSnapshot } from "./transport-BjGm__3t.mjs";
2
- import { a as GraphQLTransportOptions, i as GraphQLMutationOutput, n as GraphQLMutationInput, o as createGraphQLTransport, r as GraphQLMutationMap, s as graphqlMutation, t as GraphQLMutationDefinition } from "./graphqlTransport-B3cbhvJX.mjs";
3
- import { C as liveGlobalConnectionTopic, S as liveEntityTopic, a as FateProtocolRequest, i as FateOperation, n as FateLiveConnectionEvent, o as FateProtocolResponse, r as FateLiveEvent, t as isRecord, u as InferFateAPI, x as liveConnectionTopic } from "./record-BkvZwvFk.mjs";
4
- import { n as getListEntries, t as ListEntry } from "./list-BrL6PD_6.mjs";
1
+ import { $ as HydrateOptions, A as Snapshot, B as ViewTag, C as MutationShape, D as RequestResult, E as Request$1, F as ViewEntity, G as mutation, H as __FateSelectionBrand, I as ViewEntityName, J as RequestMode, K as DeferredSnapshot, L as ViewRef, M as TypeName, N as View, O as RootDefinition, P as ViewData, Q as FateDehydratedState, R as ViewSelection, S as MutationResult, T as Pagination, U as isViewTag, V as __FateEntityBrand, W as FateMutations, X as createClient, Y as RequestOptions, Z as getSelectionPlan, _ as Mask, a as ConnectionRef, b as MutationIdentifier, c as Deferred, d as DeferredTag, et as HydrationLimits, f as Entity, g as ListItem, h as FateThenable, i as ConnectionMetadata, j as TypeConfig, k as Selection, l as DeferredMetadata, m as FateRoots, n as createTRPCTransport, o as ConnectionTag, p as EntityId, q as FateClient, r as AnyRecord, s as DeferTag, t as Transport, tt as List, u as DeferredSelection, v as MutationDefinition, w as NodesItem, x as MutationInput, y as MutationEntity, z as ViewSnapshot } from "./transport-DhaVVq4P.mjs";
2
+ import { a as GraphQLTransportOptions, i as GraphQLMutationOutput, n as GraphQLMutationInput, o as createGraphQLTransport, r as GraphQLMutationMap, s as graphqlMutation, t as GraphQLMutationDefinition } from "./graphqlTransport-DskuXeUP.mjs";
3
+ import { C as liveGlobalConnectionTopic, S as liveEntityTopic, a as FateProtocolRequest, i as FateOperation, n as FateLiveConnectionEvent, o as FateProtocolResponse, r as FateLiveEvent, t as isRecord, u as InferFateAPI, x as liveConnectionTopic } from "./record-CZyyeLa3.mjs";
4
+ import { n as getListEntries, t as ListEntry } from "./list-sI2UPhHc.mjs";
5
5
 
6
6
  //#region src/defer.d.ts
7
7
  declare function defer<S>(selection: S): DeferredSelection<S>;
package/lib/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as isRecord } from "./record-B07VwXd-.mjs";
2
- import { a as errorCodeFromStatus, c as cloneArgs, d as hashArgs, f as paginationArgKeys, i as FateRequestError, l as combineArgsPayload, m as scopeArgsPayload, n as liveEntityTopic, p as resolvedArgsFromPlan, r as liveGlobalConnectionTopic, s as applyArgsPayloadToPlan, t as liveConnectionTopic, u as filterConnectionArgs } from "./liveTopics-JIDh3t3P.mjs";
2
+ import { a as errorCodeFromStatus, c as cloneArgs, d as hashArgs, f as paginationArgKeys, i as FateRequestError, l as combineArgsPayload, m as scopeArgsPayload, n as liveEntityTopic, p as resolvedArgsFromPlan, r as liveGlobalConnectionTopic, s as applyArgsPayloadToPlan, t as liveConnectionTopic, u as filterConnectionArgs } from "./liveTopics-uVP0LG-Q.mjs";
3
3
  import { t as getListEntries } from "./list-_6fXYLtJ.mjs";
4
- import { n as graphqlMutation, t as createGraphQLTransport } from "./graphqlTransport-IFgmY-Qq.mjs";
4
+ import { n as graphqlMutation, t as createGraphQLTransport } from "./graphqlTransport-DSBVS2Fq.mjs";
5
5
  //#region src/cache.ts
6
6
  var ViewDataCache = class {
7
7
  constructor() {
@@ -306,7 +306,7 @@ const isStringArray = (value) => Array.isArray(value) && value.every((entry) =>
306
306
  const hasDuplicates = (values) => new Set(values).size !== values.length;
307
307
  const isUniqueStringArray = (value) => isStringArray(value) && !hasDuplicates(value);
308
308
  const hasOnlyKeys = (value, keys) => Object.keys(value).every((key) => keys.has(key));
309
- const listKeys = new Set([
309
+ const listKeys = /* @__PURE__ */ new Set([
310
310
  "backwardPageLimit",
311
311
  "cursors",
312
312
  "forwardPageLimit",
@@ -317,18 +317,18 @@ const listKeys = new Set([
317
317
  "pendingAfterIds",
318
318
  "pendingBeforeIds"
319
319
  ]);
320
- const paginationKeys = new Set([
320
+ const paginationKeys = /* @__PURE__ */ new Set([
321
321
  "hasNext",
322
322
  "hasPrevious",
323
323
  "nextCursor",
324
324
  "previousCursor"
325
325
  ]);
326
- const clientStateKeys = new Set([
326
+ const clientStateKeys = /* @__PURE__ */ new Set([
327
327
  "rootLists",
328
328
  "rootRequests",
329
329
  "store"
330
330
  ]);
331
- const storeStateKeys = new Set([
331
+ const storeStateKeys = /* @__PURE__ */ new Set([
332
332
  "coverage",
333
333
  "lists",
334
334
  "records"
@@ -438,7 +438,7 @@ function intersects(a, b) {
438
438
  return false;
439
439
  }
440
440
  //#endregion
441
- //#region ../../node_modules/.pnpm/@trpc+server@11.17.0_typescript@6.0.3/node_modules/@trpc/server/dist/getErrorShape-BPSzUA7W.mjs
441
+ //#region ../../node_modules/.pnpm/@trpc+server@11.18.0_typescript@6.0.3/node_modules/@trpc/server/dist/getErrorShape-BPSzUA7W.mjs
442
442
  var __create = Object.create;
443
443
  var __defProp = Object.defineProperty;
444
444
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -701,7 +701,11 @@ const getSelectionPlan = (viewComposition, ref) => {
701
701
  append: selection.live.append === "visible" ? "visible" : "edge",
702
702
  prepend: selection.live.prepend === "visible" ? "visible" : "edge"
703
703
  });
704
- if (selection.args && isRecord(selection.args)) assignArgs("", cloneArgs(selection.args, "args"), isRecord(selection.items) && isRecord(selection.items.node) ? paginationArgKeys : void 0);
704
+ if (selection.args && isRecord(selection.args)) {
705
+ const clonedArgs = cloneArgs(selection.args, "args");
706
+ const ignoreKeys = isRecord(selection.items) && isRecord(selection.items.node) ? paginationArgKeys : void 0;
707
+ assignArgs("", clonedArgs, ignoreKeys);
708
+ }
705
709
  const { args: _args, live: _live, ...withoutArgs } = selection;
706
710
  walk(withoutArgs, prefix, "connection");
707
711
  return;
@@ -732,7 +736,11 @@ const getSelectionPlan = (viewComposition, ref) => {
732
736
  append: selectionObject.live.append === "visible" ? "visible" : "edge",
733
737
  prepend: selectionObject.live.prepend === "visible" ? "visible" : "edge"
734
738
  });
735
- if (selectionObject.args && isRecord(selectionObject.args)) assignArgs(path, cloneArgs(selectionObject.args, path), isRecord(selectionObject.items) && isRecord(selectionObject.items.node) ? paginationArgKeys : void 0);
739
+ if (selectionObject.args && isRecord(selectionObject.args)) {
740
+ const clonedArgs = cloneArgs(selectionObject.args, path);
741
+ const ignoreKeys = isRecord(selectionObject.items) && isRecord(selectionObject.items.node) ? paginationArgKeys : void 0;
742
+ assignArgs(path, clonedArgs, ignoreKeys);
743
+ }
736
744
  const { args: _ignored, live: _live, ...withoutArgs } = selectionObject;
737
745
  walk(withoutArgs, path, "connection");
738
746
  continue;
@@ -740,7 +748,9 @@ const getSelectionPlan = (viewComposition, ref) => {
740
748
  const hasArgs = selectionObject.args && isRecord(selectionObject.args);
741
749
  let selectionWithoutArgs = selectionObject;
742
750
  if (hasArgs) {
743
- assignArgs(path, cloneArgs(selectionObject.args, path), isRecord(selectionObject.items) && isRecord(selectionObject.items?.node) ? paginationArgKeys : void 0);
751
+ const clonedArgs = cloneArgs(selectionObject.args, path);
752
+ const ignoreKeys = isRecord(selectionObject.items) && isRecord(selectionObject.items?.node) ? paginationArgKeys : void 0;
753
+ assignArgs(path, clonedArgs, ignoreKeys);
744
754
  const { args: _args, ...rest } = selectionObject;
745
755
  selectionWithoutArgs = rest;
746
756
  }
@@ -821,7 +831,7 @@ function wrapMutation(client, identifier) {
821
831
  const snapshots = /* @__PURE__ */ new Map();
822
832
  const listSnapshots = deleteRecord || optimisticRecord ? /* @__PURE__ */ new Map() : void 0;
823
833
  const optimisticSelection = optimisticRecord ? collectImplicitSelectedPaths(optimisticRecord) : void 0;
824
- const selection = viewSelection || optimisticSelection ? new Set([...viewSelection ? [...viewSelection] : [], ...optimisticSelection ? [...optimisticSelection] : []]) : /* @__PURE__ */ new Set();
834
+ const selection = viewSelection || optimisticSelection ? /* @__PURE__ */ new Set([...viewSelection ? [...viewSelection] : [], ...optimisticSelection ? [...optimisticSelection] : []]) : /* @__PURE__ */ new Set();
825
835
  if (deleteRecord && id == null) throw new Error(`fate: Mutation '${identifier.key}' requires an 'id' to delete.`);
826
836
  const optimisticToken = optimisticEntityId ? client.registerOptimisticUpdate(optimisticEntityId, optimisticSelection ?? emptySet$1) : null;
827
837
  if (optimisticRecord && optimisticEntityId) client.write(identifier.entity, optimisticRecord, optimisticSelection ?? emptySet$1, snapshots, plan, null, null, insert, listSnapshots);
@@ -1063,9 +1073,9 @@ var Store = class {
1063
1073
  this.records = records;
1064
1074
  this.rebuildIndexes();
1065
1075
  const changedRecordIds = /* @__PURE__ */ new Set();
1066
- for (const id of new Set([...previousRecords.keys(), ...records.keys()])) if (!areHydrationValuesEqual(previousRecords.get(id), records.get(id)) || !areMasksEqual(previousCoverage.get(id), coverage.get(id))) changedRecordIds.add(id);
1076
+ for (const id of /* @__PURE__ */ new Set([...previousRecords.keys(), ...records.keys()])) if (!areHydrationValuesEqual(previousRecords.get(id), records.get(id)) || !areMasksEqual(previousCoverage.get(id), coverage.get(id))) changedRecordIds.add(id);
1067
1077
  const changedListKeys = /* @__PURE__ */ new Set();
1068
- for (const key of new Set([...previousLists.keys(), ...lists.keys()])) if (!areHydrationValuesEqual(previousLists.get(key), lists.get(key))) changedListKeys.add(key);
1078
+ for (const key of /* @__PURE__ */ new Set([...previousLists.keys(), ...lists.keys()])) if (!areHydrationValuesEqual(previousLists.get(key), lists.get(key))) changedListKeys.add(key);
1069
1079
  const notify = () => {
1070
1080
  for (const id of changedRecordIds) this.notify(id);
1071
1081
  for (const key of changedListKeys) this.notifyListSubscribers(key);
@@ -1439,7 +1449,7 @@ var Store = class {
1439
1449
  }
1440
1450
  return ids;
1441
1451
  }
1442
- if (isNodeRef(value)) return new Set([getNodeRefId(value)]);
1452
+ if (isNodeRef(value)) return /* @__PURE__ */ new Set([getNodeRefId(value)]);
1443
1453
  return null;
1444
1454
  }
1445
1455
  addRecordFieldReferenceIndex(id, field, value) {
@@ -1994,6 +2004,11 @@ var FateClient = class {
1994
2004
  if (!config) throw new Error(`fate: Unknown entity type '${type}'.`);
1995
2005
  return config;
1996
2006
  }
2007
+ getListNodeType(type, field) {
2008
+ const descriptor = this.getTypeConfig(type).fields?.[field];
2009
+ if (!descriptor || descriptor === "scalar" || !("listOf" in descriptor)) throw new Error(`fate: Could not find node type for '${type}.${field}'.`);
2010
+ return descriptor.listOf;
2011
+ }
1997
2012
  async executeMutation(key, input, select, options = {}) {
1998
2013
  if (!this.transport.mutate) throw new Error(`fate: transport does not support mutations. Please provide a 'mutate' implementation in your transport.`);
1999
2014
  const baseRecord = input && typeof input === "object" ? input : void 0;
@@ -2655,9 +2670,7 @@ var FateClient = class {
2655
2670
  if (!connectionPayload) return this.store.getListState(connection.key);
2656
2671
  const incomingIds = [];
2657
2672
  const incomingCursors = [];
2658
- const fieldConfig = this.getTypeConfig(owner.type).fields?.[connection.field];
2659
- const nodeType = fieldConfig && (fieldConfig === "scalar" ? null : "listOf" in fieldConfig ? fieldConfig.listOf : null) || null;
2660
- if (!nodeType) throw new Error(`fate: Could not find node type for '${owner.type}.${connection.field}'.`);
2673
+ const nodeType = this.getListNodeType(owner.type, connection.field);
2661
2674
  for (const entry of connectionPayload.items) {
2662
2675
  const { node } = entry;
2663
2676
  const id = this.write(nodeType, node, nodeSelection, void 0, plan);
@@ -3184,7 +3197,8 @@ var FateClient = class {
3184
3197
  this.snapshotList(defaultListKey, listSnapshots);
3185
3198
  this.store.setList(defaultListKey, nextDefaultListState);
3186
3199
  }
3187
- nextField = createNodeRefsForIds(pending ? getListEntries(nextDefaultListState).map(({ id }) => id) : nextDefaultListState.ids, current);
3200
+ const nextFieldIds = pending ? getListEntries(nextDefaultListState).map(({ id }) => id) : nextDefaultListState.ids;
3201
+ nextField = createNodeRefsForIds(nextFieldIds, current);
3188
3202
  } else {
3189
3203
  const currentIds = current.map((item) => isNodeRef(item) ? getNodeRefId(item) : null).filter((id) => id != null);
3190
3204
  const nextDefaultListState = { ids: insert === "before" ? [entityId, ...currentIds] : [...currentIds, entityId] };
@@ -3287,11 +3301,8 @@ var FateClient = class {
3287
3301
  } else connection.pagination = void 0;
3288
3302
  }
3289
3303
  const { id: ownerRawId, type: parentType } = parseEntityId(parentId);
3290
- const childType = (() => {
3291
- for (const item of value) if (isNodeRef(item)) return parseEntityId(getNodeRefId(item)).type;
3292
- return "";
3293
- })();
3294
3304
  if (parentType) {
3305
+ const childType = this.getListNodeType(parentType, key);
3295
3306
  const metadata = {
3296
3307
  args: (() => {
3297
3308
  if (!fieldArgs?.value && ownerRawId === void 0) return;
@@ -3759,8 +3770,8 @@ function createHTTPTransport({ eventSource, fetch: fetchImpl = defaultFetch, hea
3759
3770
  const [record] = await transport.fetchById(subscription.type, [subscription.targetId], select, subscription.args);
3760
3771
  return record;
3761
3772
  };
3762
- const resolveConnectionNode = async (subscription, id) => {
3763
- const [record] = await transport.fetchById(subscription.type, [id], subscription.select, subscription.selectionArgs);
3773
+ const resolveConnectionNode = async (subscription, id, nodeType) => {
3774
+ const [record] = await transport.fetchById(nodeType, [id], subscription.select, subscription.selectionArgs);
3764
3775
  return record;
3765
3776
  };
3766
3777
  transport.subscribeById = (type, id, select, args, handlers) => {
@@ -3867,7 +3878,7 @@ function createHTTPTransport({ eventSource, fetch: fetchImpl = defaultFetch, hea
3867
3878
  reportSubscriptionError(subscription, /* @__PURE__ */ new Error(`fate(http): Live connection event for '${procedure}' missed a node id.`));
3868
3879
  return;
3869
3880
  }
3870
- resolveConnectionNode(subscription, id).then(sendNode).catch((error) => reportSubscriptionError(subscription, error));
3881
+ resolveConnectionNode(subscription, id, nodeType).then(sendNode).catch((error) => reportSubscriptionError(subscription, error));
3871
3882
  };
3872
3883
  liveSubscriptions.set(liveId, subscription);
3873
3884
  if (!liveConnector) {
@@ -1,4 +1,4 @@
1
- import { p as EntityId, tt as List } from "./transport-BjGm__3t.mjs";
1
+ import { p as EntityId, tt as List } from "./transport-DhaVVq4P.mjs";
2
2
 
3
3
  //#region src/list.d.ts
4
4
  type ListEntry = Readonly<{
package/lib/list.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as getListEntries, t as ListEntry } from "./list-BrL6PD_6.mjs";
1
+ import { n as getListEntries, t as ListEntry } from "./list-sI2UPhHc.mjs";
2
2
  export { ListEntry, getListEntries };
@@ -17,7 +17,7 @@ const cloneArgs = (value, path) => {
17
17
  };
18
18
  return cloneValue(value, path);
19
19
  };
20
- const paginationArgKeys = new Set([
20
+ const paginationArgKeys = /* @__PURE__ */ new Set([
21
21
  "after",
22
22
  "before",
23
23
  "cursor",
@@ -1,5 +1,5 @@
1
- import { r as AnyRecord } from "./transport-BjGm__3t.mjs";
2
- import { N as DataViewResult, S as ConnectionResult, k as DataView, l as SourceDefinition, t as SourceRegistry } from "./executor-Dh-MLUXc.mjs";
1
+ import { r as AnyRecord } from "./transport-DhaVVq4P.mjs";
2
+ import { N as DataViewResult, S as ConnectionResult, k as DataView, l as SourceDefinition, t as SourceRegistry } from "./executor-C8HNogYG.mjs";
3
3
 
4
4
  //#region src/liveTopics.d.ts
5
5
  declare const liveEntityTopic: (type: string, id: string | number) => string;
@@ -1,5 +1,5 @@
1
- import { r as AnyRecord, rt as QueryProcedure } from "../transport-BjGm__3t.mjs";
2
- import { S as ConnectionResult, c as SourceConfig, f as SourcePlan, k as DataView, l as SourceDefinition, o as DataViewModule, p as SourcePlanNode, t as SourceRegistry } from "../executor-Dh-MLUXc.mjs";
1
+ import { r as AnyRecord, rt as QueryProcedure } from "../transport-DhaVVq4P.mjs";
2
+ import { S as ConnectionResult, c as SourceConfig, f as SourcePlan, k as DataView, l as SourceDefinition, o as DataViewModule, p as SourcePlanNode, t as SourceRegistry } from "../executor-C8HNogYG.mjs";
3
3
  import { AnyColumn, SQLWrapper, Table } from "drizzle-orm";
4
4
 
5
5
  //#region src/server/drizzle.d.ts