Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EvaluateMappingTemplateCommand

Evaluates a given template and returns the response. The mapping template can be a request or response template.

Request templates take the incoming request after a GraphQL operation is parsed and convert it into a request configuration for the selected data source operation. Response templates interpret responses from the data source and map it to the shape of the GraphQL field output type.

Mapping templates are written in the Apache Velocity Template Language (VTL).

example

Use a bare-bones client and the command you need to make an API call.

import { AppSyncClient, EvaluateMappingTemplateCommand } from "@aws-sdk/client-appsync"; // ES Modules import
// const { AppSyncClient, EvaluateMappingTemplateCommand } = require("@aws-sdk/client-appsync"); // CommonJS import
const client = new AppSyncClient(config);
const command = new EvaluateMappingTemplateCommand(input);
const response = await client.send(command);
see

EvaluateMappingTemplateCommandInput for command's input shape.

see

EvaluateMappingTemplateCommandOutput for command's response shape.

see

config for AppSyncClient's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: EvaluateMappingTemplateCommandInput

Readonly middlewareStack

Methods

Static getEndpointParameterInstructions