AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::AppSync::Types::CreateResolverRequest

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing CreateResolverRequest as input to an Aws::Client method, you can use a vanilla Hash:

{
  api_id: "String", # required
  type_name: "ResourceName", # required
  field_name: "ResourceName", # required
  data_source_name: "ResourceName",
  request_mapping_template: "MappingTemplate", # required
  response_mapping_template: "MappingTemplate",
  kind: "UNIT", # accepts UNIT, PIPELINE
  pipeline_config: {
    functions: ["String"],
  },
  sync_config: {
    conflict_handler: "OPTIMISTIC_CONCURRENCY", # accepts OPTIMISTIC_CONCURRENCY, LAMBDA, AUTOMERGE, NONE
    conflict_detection: "VERSION", # accepts VERSION, NONE
    lambda_conflict_handler_config: {
      lambda_conflict_handler_arn: "String",
    },
  },
  caching_config: {
    ttl: 1,
    caching_keys: ["String"],
  },
}

Instance Attribute Summary collapse

Instance Attribute Details

#api_idString

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

Returns:

  • (String)

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

#caching_configTypes::CachingConfig

The caching configuration for the resolver.

Returns:

#data_source_nameString

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

Returns:

  • (String)

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

#field_nameString

The name of the field to attach the resolver to.

Returns:

  • (String)

    The name of the field to attach the resolver to.

#kindString

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.

    Possible values:

    • UNIT
    • PIPELINE

Returns:

  • (String)

    The resolver type.

#pipeline_configTypes::PipelineConfig

The PipelineConfig.

Returns:

#request_mapping_templateString

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

Returns:

  • (String)

    The mapping template to be used for requests.

#response_mapping_templateString

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

Returns:

  • (String)

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

#sync_configTypes::SyncConfig

The SyncConfig for a resolver attached to a versioned datasource.

Returns:

  • (Types::SyncConfig)

    The SyncConfig for a resolver attached to a versioned datasource.

#type_nameString

The name of the Type.

Returns:

  • (String)

    The name of the Type.