createFieldAliasSchema()

The createFieldAliasSchema() GraphQL mutation may be used to create a schema. If another schema already exists with the same name, this overwrites it.

Syntax

Below is the syntax for the createFieldAliasSchema() mutation field:

graphql
createFieldAliasSchema(
      input: CreateFieldAliasSchemaInput!
   ): FieldAliasSchema

Given Datatypes

For the input CreateFieldAliasSchemaInput(), there are several parameters that may be given. Below is a list of them along with their datatypes and a description of each:

Table: CreateFieldAliasSchemaInput

ParameterTypeRequired[a]DefaultDescription
namestringyes The name of the field alias schema.
fields[SchemaFieldInput]yes The schema field inputs. See the SchemaFieldInput table.
aliasMappings[AliasMappingInput]yes The alias mapping inputs. See the AliasMappingInput table.

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.


Returned Datatypes

As indicated by the syntax above, this mutation will return the token using the datatype, FieldAliasSchema. Below is a list of the parameters of that datatype:

Table: FieldAliasSchema

ParameterTypeRequired[a]DefaultDescription
idstringyes The unique identifier of the field alias schema.
namestringyes The name of the schema.
fields[SchemaField]yes The schema fields. This uses a datatype called, SchemaField, which has two string fields: named, which is required; and description.
instances[AliasMapping]yes The instances used. See the AliasMapping table.
versionstringyes The version.

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.