Custom Scalars Configuration
Custom scalars configuration
You can specify a custom scalars configuration JSON file to map a custom scalar to a JSON schema type. The JSON file is an object with custom scalar names as keys and JSON schema types as values:
JSON
1{
2 "MyCustomScalar": { "type": "string" }
3}
Other than JSON schema type, an overriding description can also be provided. In the following example the description provided in the schema, scalar description
, would get overridden by the description found in the custom scalar configuration file, override description
:
GraphQL
1"""
2scalar description
3"""
4scalar MyCustomScalar
JSON
1{
2 "MyCustomScalar": { "type": "string", "description": "override description" }
3}