Docs Home → Atlas App Services
GraphQL Configuration Files
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> }
Field | Description |
---|---|
use_natural_pluralization Boolean | If If ExampleApp Services can use either a natural plural or a default plural for a generated "mouse" type:
|
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 | JSON Schema | 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 | JSON Schema | 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: |