createFieldAliasSchemaFromTemplate()

API Stability Preview

The createFieldAliasSchemaFromTemplate() GraphQL mutation field is used to creates a field aliasing schema from a YAML file. This is a preview and may be changed.

Syntax

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

graphql
createFieldAliasSchemaFromTemplate(
       input: CreateFieldAliasSchemaFromTemplateInput!
    ): FieldAliasSchema!

Below is an example of how this mutation field might be used:

Show:
graphql
mutation {
  createFieldAliasSchemaFromTemplate(input:
         {name: "my-alias",
          yamlTemplate: "..." } )
  { id }
}

Given Datatypes

For CreateFieldAliasSchemaFromTemplateInput, there are a few parameters. Below is a list of them:

Table: CreateFieldAliasSchemaFromTemplateInput

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Dec 10, 2024
namestring   The name of the field alias schema.
yamlTemplatestringyes  The YAML template to use.

Returned Datatypes

As indicated by the syntax above, this mutation will return data using the datatype, FieldAliasSchema. Below are the parameters of that datatype:

Table: FieldAliasSchema

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Mar 26, 2025
fields[SchemaField]yes Long-TermThe schema fields. See SchemaField.
idstringyes Long-TermThe unique identifier of the field alias schema.
instances[AliasMapping]yes Long-TermThe instances used. See AliasMapping.
namestringyes Long-TermThe name of the schema.
versionstringyes Long-TermThe version.
yamlTemplateyamlyes Long-TermA YAML template.