Mutation
mutation UpsertTenantFieldSchema($input: UpsertTenantFieldSchemaInput!) {
upsertTenantFieldSchema(input: $input) {
tenantFieldSchemas {
id
source
externalFieldId
label
type
options
}
result
results
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"tenantFieldSchemas": [
{
"source": "string",
"externalFieldId": "id",
"label": "string",
"type": "STRING_TYPE",
"isVisible": true,
"order": 1
}
]
}
}Response
{
"data": {
"upsertTenantFieldSchema": {
"tenantFieldSchemas": [
{
"id": "id",
"source": "string",
"externalFieldId": "id",
"label": "string",
"type": "STRING_TYPE",
"options": [
"string"
]
}
],
"result": "UPDATED",
"results": [
"UPDATED"
],
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
upsertTenantFieldSchema
Creates or updates one or more tenant field schemas in a single call. Each schema is identified by the combination of source and externalFieldId — if a schema with that pair already exists it is updated, otherwise a new one is created. Requires tenantFieldSchema:create or tenantFieldSchema:edit permission.
MUTATION
upsertTenantFieldSchema(input: UpsertTenantFieldSchemaInput!): UpsertTenantFieldSchemaOutput!Arguments
input
required
Returns
tenantFieldSchemas
result
deprecated
Use results instead.
results
[UpsertResult!]
The outcome per input schema, ordered to match input.tenantFieldSchemas.
error
Mutation
mutation UpsertTenantFieldSchema($input: UpsertTenantFieldSchemaInput!) {
upsertTenantFieldSchema(input: $input) {
tenantFieldSchemas {
id
source
externalFieldId
label
type
options
}
result
results
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"tenantFieldSchemas": [
{
"source": "string",
"externalFieldId": "id",
"label": "string",
"type": "STRING_TYPE",
"isVisible": true,
"order": 1
}
]
}
}Response
{
"data": {
"upsertTenantFieldSchema": {
"tenantFieldSchemas": [
{
"id": "id",
"source": "string",
"externalFieldId": "id",
"label": "string",
"type": "STRING_TYPE",
"options": [
"string"
]
}
],
"result": "UPDATED",
"results": [
"UPDATED"
],
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

