v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1451205197.1 KB

Evaluates the given code and returns the response. The code definition requirements depend on the specified runtime. For <code>APPSYNC_JS</code> runtimes, the code defines the request and response functions. The request function takes the incoming request after a GraphQL operation is parsed and converts it into a request configuration for the selected data source operation. The response function interprets responses from the data source and maps it to the shape of the GraphQL field output type.

post/v1/dataplane-evaluatecode

Request body

codestring required

The code definition to be evaluated. Note that <code>code</code> and <code>runtime</code> are both required for this action. The <code>runtime</code> value must be <code>APPSYNC_JS</code>.

contextstring required

The map that holds all of the contextual information for your resolver invocation. A <code>context</code> is required for this action.

functionstring

The function within the code to be evaluated. If provided, the valid values are <code>request</code> and <code>response</code>.

Response

Success

evaluationResultstring

The result of the evaluation operation.

logsString[]

A list of logs that were generated by calls to <code>util.log.info</code> and <code>util.log.error</code> in the evaluated code.