MutationSource.mutation
property · packages/remote-server/src/index.ts:281
readonly mutation: stringRemote / foldkit-remote-server
interface · packages/remote-server/src/index.ts:280
interface MutationSource<P, R = never> {
readonly mutation: string
readonly writes?: {
readonly entity: string
readonly writer: unknown
}
readonly Input: Schema.Codec<unknown>
readonly Output: Schema.Codec<unknown>
readonly Refusal: Schema.Codec<unknown, unknown>
readonly run: (context: {
readonly input: unknown
readonly principal: P
readonly requestId: string
readonly keys?: ReadonlyArray<string> | undefined
}) => Effect.Effect<
{
readonly output: unknown
readonly entities: ReadonlyArray<NormalizedPatch>
readonly connections: ReadonlyArray<ConnectionChange>
readonly deleted: ReadonlyArray<{
readonly entity: string
readonly id: string
}>
},
RemoteServerError | MutationRefused | RemoteForbidden,
R
>
}MutationSource.mutationproperty · packages/remote-server/src/index.ts:281
readonly mutation: stringMutationSource.writesproperty · packages/remote-server/src/index.ts:287
readonly writes?: {
readonly entity: string
readonly writer: unknown
}For a declared write (RemoteServer.write), the Entity it writes and the
writer it lands through, as it was given one. The server never reads it;
a startup check such as GuardServer.validate does.
MutationSource.Inputproperty · packages/remote-server/src/index.ts:288
readonly Input: Schema.Codec<unknown>MutationSource.Outputproperty · packages/remote-server/src/index.ts:289
readonly Output: Schema.Codec<unknown>MutationSource.Refusalproperty · packages/remote-server/src/index.ts:290
readonly Refusal: Schema.Codec<unknown, unknown>MutationSource.runproperty · packages/remote-server/src/index.ts:291
readonly run: (context: {
readonly input: unknown
readonly principal: P
readonly requestId: string
readonly keys?: ReadonlyArray<string> | undefined
}) => Effect.Effect<
{
readonly output: unknown
readonly entities: ReadonlyArray<NormalizedPatch>
readonly connections: ReadonlyArray<ConnectionChange>
readonly deleted: ReadonlyArray<{
readonly entity: string
readonly id: string
}>
},
RemoteServerError | MutationRefused | RemoteForbidden,
R
>