v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1451205197.1 KB

Updates a <code>Resolver</code> object.

post/v1/apis/{apiId}/types/{typeName}/resolvers/{fieldName}

Path parameters

apiIdstring required

The API ID.

typeNamestring required

The new type name.

fieldNamestring required

The new field name.

Request body

dataSourceNamestring

The new data source name.

requestMappingTemplatestring
<p>The new request mapping template.</p> <p>A resolver uses a request mapping template to convert a GraphQL expression into a format that a data source can understand. Mapping templates are written in Apache Velocity Template Language (VTL).</p> <p>VTL request mapping templates are optional when using an Lambda data source. For all other data sources, VTL request and response mapping templates are required.</p>
responseMappingTemplatestring

The new response mapping template.

kind'UNIT' | 'PIPELINE'
<p>The resolver type.</p> <ul> <li> <p> <b>UNIT</b>: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.</p> </li> <li> <p> <b>PIPELINE</b>: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of <code>Function</code> objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.</p> </li> </ul>
maxBatchSizeinteger

The maximum batching size for a resolver.

codestring

The <code>resolver</code> code that contains the request and response functions. When code is used, the <code>runtime</code> is required. The <code>runtime</code> value must be <code>APPSYNC_JS</code>.

Response

Success