@contember/client-content
Advanced tools
Comparing version
@@ -98,3 +98,7 @@ import { createListArgs } from "./utils/createListArgs.js"; | ||
}); | ||
return new ContentOperation("mutation", "transaction", transactionArgs, combined.selection, ({ ok, errorMessage, errors, validation, ...data }) => { | ||
const items = [ | ||
...this.createMutationSelection("transaction"), | ||
...combined.selection | ||
]; | ||
return new ContentOperation("mutation", "transaction", transactionArgs, items, ({ ok, errorMessage, errors, validation, ...data }) => { | ||
return { | ||
@@ -101,0 +105,0 @@ ok, |
@@ -98,3 +98,7 @@ import { createListArgs } from "./utils/createListArgs.js"; | ||
}); | ||
return new ContentOperation("mutation", "transaction", transactionArgs, combined.selection, ({ ok, errorMessage, errors, validation, ...data }) => { | ||
const items = [ | ||
...this.createMutationSelection("transaction"), | ||
...combined.selection | ||
]; | ||
return new ContentOperation("mutation", "transaction", transactionArgs, items, ({ ok, errorMessage, errors, validation, ...data }) => { | ||
return { | ||
@@ -101,0 +105,0 @@ ok, |
@@ -52,3 +52,3 @@ import { Input, JSONObject } from '@contember/schema'; | ||
type CreateDataInput<TEntity extends EntityTypeLike> = { | ||
readonly [key in keyof TEntity['columns']]?: TEntity['columns'][key]['tsType']; | ||
readonly [key in keyof TEntity['columns']]?: TEntity['columns'][key]; | ||
} & { | ||
@@ -62,3 +62,3 @@ readonly [key in keyof TEntity['hasMany']]?: CreateManyRelationInput<TEntity['hasMany'][key]>; | ||
type UpdateDataInput<TEntity extends EntityTypeLike> = { | ||
readonly [key in keyof TEntity['columns']]?: TEntity['columns'][key]['tsType']; | ||
readonly [key in keyof TEntity['columns']]?: TEntity['columns'][key]; | ||
} & { | ||
@@ -65,0 +65,0 @@ readonly [key in keyof TEntity['hasMany']]?: UpdateManyRelationInput<TEntity['hasMany'][key]>; |
{ | ||
"name": "@contember/client-content", | ||
"license": "Apache-2.0", | ||
"version": "1.3.0-alpha.4", | ||
"version": "1.3.0-alpha.5", | ||
"main": "./dist/production/index.js", | ||
@@ -38,4 +38,4 @@ "exports": { | ||
"dependencies": { | ||
"@contember/graphql-builder": "1.3.0-alpha.4", | ||
"@contember/graphql-client": "1.3.0-alpha.4", | ||
"@contember/graphql-builder": "1.3.0-alpha.5", | ||
"@contember/graphql-client": "1.3.0-alpha.5", | ||
"@contember/schema": "^1.3.6" | ||
@@ -42,0 +42,0 @@ }, |
@@ -150,3 +150,7 @@ import { ContentClientInput, MutationResult, SchemaNames, TransactionResult } from './types' | ||
}) | ||
return new ContentOperation<TransactionResult<any>, 'mutation'>('mutation', 'transaction', transactionArgs, combined.selection, ({ ok, errorMessage, errors, validation, ...data }) => { | ||
const items = [ | ||
...this.createMutationSelection('transaction'), | ||
...combined.selection, | ||
] | ||
return new ContentOperation<TransactionResult<any>, 'mutation'>('mutation', 'transaction', transactionArgs, items, ({ ok, errorMessage, errors, validation, ...data }) => { | ||
return { | ||
@@ -162,3 +166,3 @@ ok, | ||
private createMutationSelection(operation: 'create' | 'update' | 'delete' | 'upsert', selection?: GraphQlSelectionSet): GraphQlSelectionSet { | ||
private createMutationSelection(operation: 'create' | 'update' | 'delete' | 'upsert' | 'transaction', selection?: GraphQlSelectionSet): GraphQlSelectionSet { | ||
const items: GraphQlSelectionSet = [ | ||
@@ -165,0 +169,0 @@ new GraphQlField(null, 'ok'), |
@@ -67,3 +67,3 @@ import { Input, JSONObject } from '@contember/schema' | ||
& { | ||
readonly [key in keyof TEntity['columns']]?: TEntity['columns'][key]['tsType'] | ||
readonly [key in keyof TEntity['columns']]?: TEntity['columns'][key] | ||
} | ||
@@ -86,3 +86,3 @@ & { | ||
& { | ||
readonly [key in keyof TEntity['columns']]?: TEntity['columns'][key]['tsType'] | ||
readonly [key in keyof TEntity['columns']]?: TEntity['columns'][key] | ||
} | ||
@@ -89,0 +89,0 @@ & { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
347794
0.34%3556
0.57%+ Added
+ Added
- Removed
- Removed