graphql

Create a custom resolver

Create a new custom resolver.

post/groups/{groupId}/apps/{appId}/graphql/custom_resolvers

Request body

on_typestring required

The name of the resolver's parent type. This can be "Query", "Mutation", or the name of a generated type if this is a computed property.

field_namestring required

The name of the custom resolver field that appears in the GraphQL schema.

input_type_format'scalar' | 'scalar-list' | 'generated' | 'generated-list' | 'custom'

The kind of input type the custom resolver uses. This value must agree with the value of input_type:

  • A scalar input type must use "scalar" or "scalar-list"
  • A generated input type must use "generated" or "generated-list"
  • A custom input type must use "custom"

If undefined, the resolver does not accept an input.

payload_type_format'scalar' | 'scalar-list' | 'generated' | 'generated-list' | 'custom'

The kind of payload type the custom resolver uses. This value must agree with the value of payload_type:

  • A scalar payload type must use "scalar" or "scalar-list"
  • A generated payload type must use "generated" or "generated-list"
  • A custom payload type must use "custom"

If undefined, the resolver returns a DefaultPayload object.

_idstring required

The custom resolver's unique ID.

function_idstring required

The resolver function's unique ID.

Response

Created

on_typestring required

The name of the resolver's parent type. This can be "Query", "Mutation", or the name of a generated type if this is a computed property.

field_namestring required

The name of the custom resolver field that appears in the GraphQL schema.

input_type_format'scalar' | 'scalar-list' | 'generated' | 'generated-list' | 'custom'

The kind of input type the custom resolver uses. This value must agree with the value of input_type:

  • A scalar input type must use "scalar" or "scalar-list"
  • A generated input type must use "generated" or "generated-list"
  • A custom input type must use "custom"

If undefined, the resolver does not accept an input.

payload_type_format'scalar' | 'scalar-list' | 'generated' | 'generated-list' | 'custom'

The kind of payload type the custom resolver uses. This value must agree with the value of payload_type:

  • A scalar payload type must use "scalar" or "scalar-list"
  • A generated payload type must use "generated" or "generated-list"
  • A custom payload type must use "custom"

If undefined, the resolver returns a DefaultPayload object.

_idstring required

The custom resolver's unique ID.

function_idstring required

The resolver function's unique ID.

Changes

Changed in 1 of the 50 revisions of this API.7121

  • v3e2240dd053bd7121See the full diff
    • added subschema #2 to the request body allOf list

      request-body-all-of-added

    • the request's body type changed from object to no type

      request-body-type-changed

    • the response's body type changed from object to no type for status

      response-body-type-changed

    • removed the required property from the response with the status

      response-required-property-removed

    • removed the required property from the response with the status

      response-required-property-removed

    • removed the required property from the response with the status

      response-required-property-removed

    • removed the required property from the response with the status

      response-required-property-removed

    • removed the request property

      request-property-removed

    • removed the request property

      request-property-removed

    • removed the request property

      request-property-removed

    • removed the request property

      request-property-removed

    • removed the request property

      request-property-removed

    • removed the request property

      request-property-removed

    • removed the request property

      request-property-removed

    • removed the request property

      request-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • added subschema #2 to the response body allOf list for the response status

      response-body-all-of-added

    This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog