libZSservicesZSamazonka-appsyncZSamazonka-appsync
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.AppSync.CreateResolver

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.

Synopsis

Creating a Request

data CreateResolver Source #

See: newCreateResolver smart constructor.

Constructors

CreateResolver' 

Fields

  • dataSourceName :: Maybe Text

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

  • requestMappingTemplate :: Maybe Text

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

    VTL request mapping templates are optional when using a Lambda data source. For all other data sources, VTL request and response mapping templates are required.

  • kind :: Maybe ResolverKind

    The resolver type.

    • UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. A UNIT resolver enables you to execute a GraphQL query against a single data source.
    • PIPELINE: A PIPELINE resolver type. A PIPELINE resolver enables you to execute a series of Function in a serial manner. You can use a pipeline resolver to execute a GraphQL query against multiple data sources.
  • cachingConfig :: Maybe CachingConfig

    The caching configuration for the resolver.

  • responseMappingTemplate :: Maybe Text

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

  • syncConfig :: Maybe SyncConfig

    The SyncConfig for a resolver attached to a versioned datasource.

  • pipelineConfig :: Maybe PipelineConfig

    The PipelineConfig.

  • apiId :: Text

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

  • typeName :: Text

    The name of the Type.

  • fieldName :: Text

    The name of the field to attach the resolver to.

Instances

Instances details
Eq CreateResolver Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

Read CreateResolver Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

Show CreateResolver Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

Generic CreateResolver Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

Associated Types

type Rep CreateResolver :: Type -> Type #

NFData CreateResolver Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

Methods

rnf :: CreateResolver -> () #

Hashable CreateResolver Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

ToJSON CreateResolver Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

AWSRequest CreateResolver Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

Associated Types

type AWSResponse CreateResolver #

ToHeaders CreateResolver Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

ToPath CreateResolver Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

ToQuery CreateResolver Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

type Rep CreateResolver Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

type AWSResponse CreateResolver Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

newCreateResolver Source #

Create a value of CreateResolver with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:dataSourceName:CreateResolver', createResolver_dataSourceName - The name of the data source for which the resolver is being created.

$sel:requestMappingTemplate:CreateResolver', createResolver_requestMappingTemplate - 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).

VTL request mapping templates are optional when using a Lambda data source. For all other data sources, VTL request and response mapping templates are required.

$sel:kind:CreateResolver', createResolver_kind - The resolver type.

  • UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. A UNIT resolver enables you to execute a GraphQL query against a single data source.
  • PIPELINE: A PIPELINE resolver type. A PIPELINE resolver enables you to execute a series of Function in a serial manner. You can use a pipeline resolver to execute a GraphQL query against multiple data sources.

$sel:cachingConfig:CreateResolver', createResolver_cachingConfig - The caching configuration for the resolver.

$sel:responseMappingTemplate:CreateResolver', createResolver_responseMappingTemplate - The mapping template to be used for responses from the data source.

$sel:syncConfig:CreateResolver', createResolver_syncConfig - The SyncConfig for a resolver attached to a versioned datasource.

$sel:pipelineConfig:CreateResolver', createResolver_pipelineConfig - The PipelineConfig.

$sel:apiId:CreateResolver', createResolver_apiId - The ID for the GraphQL API for which the resolver is being created.

$sel:typeName:CreateResolver', createResolver_typeName - The name of the Type.

$sel:fieldName:CreateResolver', createResolver_fieldName - The name of the field to attach the resolver to.

Request Lenses

createResolver_dataSourceName :: Lens' CreateResolver (Maybe Text) Source #

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

createResolver_requestMappingTemplate :: Lens' CreateResolver (Maybe Text) Source #

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

VTL request mapping templates are optional when using a Lambda data source. For all other data sources, VTL request and response mapping templates are required.

createResolver_kind :: Lens' CreateResolver (Maybe ResolverKind) Source #

The resolver type.

  • UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. A UNIT resolver enables you to execute a GraphQL query against a single data source.
  • PIPELINE: A PIPELINE resolver type. A PIPELINE resolver enables you to execute a series of Function in a serial manner. You can use a pipeline resolver to execute a GraphQL query against multiple data sources.

createResolver_cachingConfig :: Lens' CreateResolver (Maybe CachingConfig) Source #

The caching configuration for the resolver.

createResolver_responseMappingTemplate :: Lens' CreateResolver (Maybe Text) Source #

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

createResolver_syncConfig :: Lens' CreateResolver (Maybe SyncConfig) Source #

The SyncConfig for a resolver attached to a versioned datasource.

createResolver_apiId :: Lens' CreateResolver Text Source #

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

createResolver_fieldName :: Lens' CreateResolver Text Source #

The name of the field to attach the resolver to.

Destructuring the Response

data CreateResolverResponse Source #

See: newCreateResolverResponse smart constructor.

Constructors

CreateResolverResponse' 

Fields

Instances

Instances details
Eq CreateResolverResponse Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

Read CreateResolverResponse Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

Show CreateResolverResponse Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

Generic CreateResolverResponse Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

Associated Types

type Rep CreateResolverResponse :: Type -> Type #

NFData CreateResolverResponse Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

Methods

rnf :: CreateResolverResponse -> () #

type Rep CreateResolverResponse Source # 
Instance details

Defined in Amazonka.AppSync.CreateResolver

type Rep CreateResolverResponse = D1 ('MetaData "CreateResolverResponse" "Amazonka.AppSync.CreateResolver" "libZSservicesZSamazonka-appsyncZSamazonka-appsync" 'False) (C1 ('MetaCons "CreateResolverResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "resolver") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Resolver)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateResolverResponse Source #

Create a value of CreateResolverResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:resolver:CreateResolverResponse', createResolverResponse_resolver - The Resolver object.

$sel:httpStatus:CreateResolverResponse', createResolverResponse_httpStatus - The response's http status code.

Response Lenses