---
title: "Modify a custom resolver"
method: PUT
path: "/groups/{groupId}/apps/{appId}/graphql/custom_resolvers/{customResolverId}"
tags: ["graphql"]
---

# Modify a custom resolver

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

Modify an existing [custom resolver](https://www.mongodb.com/docs/atlas/app-services/graphql/custom-resolvers/) configuration.

## Request body

- CustomResolver
  - `on_type` string, 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_name` string, required — The name of the custom resolver field that appears in the GraphQL schema.
  - `input_type` union — 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.
    - string
    - object
  - `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` union — 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. If undefined, the resolver returns a `DefaultPayload` object: ```graphql type DefaultPayload { status: String! } ```
    - string
    - object
  - `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.
  - `_id` string, required — The custom resolver's unique ID.
  - `function_id` string, required — The resolver function's unique ID.

## Response `204`

Updated

## Changes

- **2024-02-20** (v3) `e2240dd053bd` — 2 breaking, 8 warning
  - added `#/components/schemas/BaseCustomResolver, subschema #2` to the request body `allOf` list
  - the request's body type changed from `object` to no type
  - removed the request property `_id`
  - removed the request property `field_name`
  - …6 more

[Change history](https://skmtc.dev/mongodb/apis/mongodb-atlas-app-services-admin-api/changes/groups/:groupId/apps/:appId/graphql/custom_resolvers/:customResolverId/put.md)

---

[API](https://skmtc.dev/mongodb/apis/mongodb-atlas-app-services-admin-api.md) · [All operations](https://skmtc.dev/mongodb/apis/mongodb-atlas-app-services-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mongodb/mongodb-atlas-app-services-admin-api/revisions/1365ab72bc03/schema)
