Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . appsync ]

create-resolver

Description

Creates a Resolver object.

A resolver converts incoming requests into a format that a data source can understand and converts the data source's responses into GraphQL.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  create-resolver
--api-id <value>
--type-name <value>
--field-name <value>
--data-source-name <value>
--request-mapping-template <value>
[--response-mapping-template <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--api-id (string)

The ID for the GraphQL API for which the resolver is being created.

--type-name (string)

The name of the Type .

--field-name (string)

The name of the field to attach the resolver to.

--data-source-name (string)

The name of the data source for which the resolver is being created.

--request-mapping-template (string)

The mapping template to be used for requests.

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).

--response-mapping-template (string)

The mapping template to be used for responses from the data source.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

resolver -> (structure)

The Resolver object.

typeName -> (string)

The resolver type name.

fieldName -> (string)

The resolver field name.

dataSourceName -> (string)

The resolver data source name.

resolverArn -> (string)

The resolver ARN.

requestMappingTemplate -> (string)

The request mapping template.

responseMappingTemplate -> (string)

The response mapping template.