PUT /groups/{groupId}/apps/{appId}/graphql/custom_resolvers/{customResolverId}

Modificar una configuración existente de resolvedor personalizado.

Parámetros de path

aplicación/json

Cuerpo Requerido

A valid, updated custom resolver configuration object.

  • on_type string Requerido

    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_name string Requerido

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

  • input_type string | objeto

    The type of the custom resolver's input parameter. This can be a scalar, the name of an existing generated type, or a custom JSON schema object. If undefined, the resolver does not accept an input.

  • input_type_format string

    El tipo de entrada que utiliza el resolvedor personalizado. Este valor debe corresponder al valor de input_type:

    • Un tipo de entrada escalar debe usar "scalar" o "scalar-list"
    • Un tipo de entrada generado debe utilizar "generated" o "generated-list"
    • Se debe utilizar un tipo de entrada personalizado "custom"

    If undefined, the resolver does not accept an input.

    Los valores son scalar, scalar-list, generated, generated-list o custom.

  • payload_type string | objeto

    The type of the value returned by the custom resolver. This can be a scalar, the name of an existing generated type, or a custom JSON schema object.

    Si no se define, el resolver devuelve un objeto DefaultPayload:

    type DefaultPayload {
      status: String!
    }
    
  • payload_type_format string

    El tipo de carga útil que utiliza el resolvedor personalizado. Este valor debe corresponder al valor de payload_type:

    • A scalar payload type must use "scalar" or "scalar-list"
    • A generated payload type must use "generated" or "generated-list"
    • Un tipo de carga útil personalizada debe usar "custom"

    If undefined, the resolver returns a DefaultPayload object.

    Los valores son scalar, scalar-list, generated, generated-list o custom.

  • _id string

    The custom resolver's unique ID.

  • function_id string

    El ID único de la función resolver.

Respuestas

  • 204

    Actualizado

PUT /groups/{groupId}/apps/{appId}/graphql/custom_resolvers/{customResolverId}
curl \
 --request PUT 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/graphql/custom_resolvers/{customResolverId}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"on_type":"string","field_name":"string","input_type":"string","input_type_format":"scalar","payload_type":"string","payload_type_format":"scalar","_id":"string","function_id":"string"}'
Solicitar ejemplos
{
  "on_type": "string",
  "field_name": "string",
  "input_type": "string",
  "input_type_format": "scalar",
  "payload_type": "string",
  "payload_type_format": "scalar",
  "_id": "string",
  "function_id": "string"
}