GraphQL Configuration Files
GraphQL is deprecated. Learn More.
You can configure the GraphQL API for your application in
the graphql
directory:
app/ └── graphql/ ├── config.json └── custom_resolvers └── <resolver name>.json
Service Configuration
{ "use_natural_pluralization": <Boolean>, "disable_schema_introspection": <Boolean> }
Field | Description |
---|---|
use_natural_pluralization boolean |
You can only set the value to If If ExampleApp Services can use either a natural plural or a default plural for a generated "mouse" type:
|
disable_schema_introspection boolean | This value is If This setting is useful for production Apps that do not want to expose their GraphQL schema to the public. When introspection is disabled, clients like GraphiQL cannot show docs for the API schema or autocomplete queries and mutations. |
Custom Resolver Configuration
{ "on_type": "<Parent Type Name>", "field_name": "<Resolver Field Name>", "function_name": "<Resolver Function Name>", "input_type": "<Input Type Name>" | { <JSON Schema> }, "input_type_format": "<Input Type Format>", "payload_type": "<Payload Type Name>" | { <JSON Schema> }, "payload_type_format": "<Payload Type Format>", }
Field | Description | |||
---|---|---|---|---|
on_type string | The parent type that exposes the custom resolver as one of its fields. Valid Options:
| |||
field_name string | The name of the field on the parent type that exposes the custom resolver. The field name must be unique among all custom resolver on its parent type. If the field name matches a field in the parent type's schema, the custom resolver overrides the schema type. | |||
function_name string | The name of the function that runs when the
resolver is called. The function arguments may accept a single argument
(configured by input_type and input_type_format ) and must return
a payload value (configured by payload_type and
payload_type_format ). | |||
input_type string | object | The type of the resolver's input argument (if it accepts input). You
can specify either the name of another type in your GraphQL schema or a
custom JSON schema specific to the resolver. | |||
input_type_format string | A metadata description of the Valid Options: | |||
payload_type string | object | The type of the value returned in the resolver's payload. You can specify either the name of another type in your GraphQL schema or a custom JSON schema specific to the resolver. If you do not specify a payload type, the resolver returns a
| |||
payload_type_format string | A metadata description of the Valid Options: |