createFieldAliasSchema()

API Stability Long-Term

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

Syntax

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

graphql
createFieldAliasSchema(
      input: CreateFieldAliasSchemaInput!
   ): FieldAliasSchema

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

Show:
graphql
mutation {
  createFieldAliasSchema(input:
      { name: "my-scheme",
        fields: [{name: "host"}],
        aliasMappings: [{name:"test", tags: [{name: "#kind", value: "#make"}],
                        aliases: [{source: "something", alias: "other"}]} ]
      } )
  { id }
}
Example Responses
Show:
json
{
  "data": {
    "createFieldAliasSchema": {
      "id": "fBqzhOMaMwSIbNTY3oXz0vnaULtpRviy"
    }
  }
}

Given Datatypes

The CreateFieldAliasSchemaInput input datatype has a few parameters. Below is a list of them:

Table: CreateFieldAliasSchemaInput

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: Sep 17, 2024
aliasMappings[AliasMappingInput]yes Long-TermThe alias mapping inputs. See AliasMappingInput.
fields[SchemaFieldInput]yes Long-TermThe schema field inputs. See SchemaFieldInput.
namestringyes Long-TermThe name of the field alias schema.

Returned Datatypes

For FieldAliasSchema, there are several parameters. They're listed here:

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.