2019-12-26 15:05:37 +03:00
|
|
|
.. _custom_field_names:
|
|
|
|
|
|
|
|
Customise auto-generated field names
|
|
|
|
====================================
|
|
|
|
|
|
|
|
.. contents:: Table of contents
|
|
|
|
:backlinks: none
|
|
|
|
:depth: 2
|
|
|
|
:local:
|
|
|
|
|
|
|
|
It is possible to override the auto-generated table and column field names exposed over the GraphQL API.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
This feature is supported in versions ``v1.0.0-beta.8`` and later.
|
|
|
|
|
|
|
|
Expose columns with a different name in the GraphQL API
|
|
|
|
-------------------------------------------------------
|
|
|
|
|
|
|
|
.. rst-class:: api_tabs
|
|
|
|
.. tabs::
|
|
|
|
|
|
|
|
.. tab:: Console
|
|
|
|
|
|
|
|
Head to the ``Data -> [table-name] -> Modify``
|
|
|
|
|
|
|
|
.. thumbnail:: ../../../img/graphql/manual/schema/custom-field-name-column.png
|
2020-01-08 16:20:18 +03:00
|
|
|
:alt: Customise GraphQL field name
|
2019-12-26 15:05:37 +03:00
|
|
|
|
|
|
|
.. tab:: Metadata API
|
|
|
|
|
|
|
|
A custom field name can be set for a column via the following 2 methods:
|
|
|
|
|
|
|
|
- passing a :ref:`table_config` with the :ref:`CustomColumnNames` to the :ref:`track_table_v2` API while
|
|
|
|
tracking a table
|
|
|
|
- using the :ref:`set_table_custom_fields` API to set the :ref:`CustomColumnNames`
|
|
|
|
|
|
|
|
|
|
|
|
Expose table root fields with a different name in the GraphQL API
|
|
|
|
-----------------------------------------------------------------
|
|
|
|
|
|
|
|
.. rst-class:: api_tabs
|
|
|
|
.. tabs::
|
|
|
|
|
|
|
|
.. tab:: Console
|
|
|
|
|
|
|
|
Head to the ``Data -> [table-name] -> Modify``
|
|
|
|
|
|
|
|
.. thumbnail:: ../../../img/graphql/manual/schema/custom-field-name-root-fields.png
|
2020-01-08 16:20:18 +03:00
|
|
|
:alt: Customise GraphQL root field
|
2019-12-26 15:05:37 +03:00
|
|
|
|
|
|
|
.. tab:: Metadata API
|
|
|
|
|
|
|
|
A custom field name can be set for a table root field via the following 2 methods:
|
|
|
|
|
|
|
|
- passing a :ref:`table_config` with the :ref:`custom_root_fields` names to the :ref:`track_table_v2` API while
|
|
|
|
tracking a table
|
|
|
|
- using the :ref:`set_table_custom_fields` API to set the :ref:`custom_root_fields` names
|
|
|
|
|
|
|
|
|