2022/01/06 - AWS AppSync - 9 updated api methods
Changes AppSync: AWS AppSync now supports configurable batching sizes for AWS Lambda resolvers, Direct AWS Lambda resolvers and pipeline functions
{'maxBatchSize': 'integer'}Response
{'functionConfiguration': {'maxBatchSize': 'integer'}}
Creates a Function object.
A function is a reusable entity. You can use multiple functions to compose the resolver logic.
See also: AWS API Documentation
Request Syntax
client.create_function( apiId='string', name='string', description='string', dataSourceName='string', requestMappingTemplate='string', responseMappingTemplate='string', functionVersion='string', syncConfig={ 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } }, maxBatchSize=123 )
string
[REQUIRED]
The GraphQL API ID.
string
[REQUIRED]
The Function name. The function name does not have to be unique.
string
The Function description.
string
[REQUIRED]
The Function DataSource name.
string
The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
string
The Function response mapping template.
string
[REQUIRED]
The version of the request mapping template. Currently, the supported value is 2018-05-29.
dict
Describes a Sync configuration for a resolver.
Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
AUTOMERGE: Resolve conflicts with the Automerge conflict resolution strategy.
LAMBDA: Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig.
conflictDetection (string) --
The Conflict Detection strategy to use.
VERSION: Detect conflicts based on object versions for this resolver.
NONE: Do not detect conflicts when invoking this resolver.
lambdaConflictHandlerConfig (dict) --
The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.
lambdaConflictHandlerArn (string) --
The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
integer
The maximum batching size for a resolver.
dict
Response Syntax
{ 'functionConfiguration': { 'functionId': 'string', 'functionArn': 'string', 'name': 'string', 'description': 'string', 'dataSourceName': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'functionVersion': 'string', 'syncConfig': { 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } }, 'maxBatchSize': 123 } }
Response Structure
(dict) --
functionConfiguration (dict) --
The Function object.
functionId (string) --
A unique ID representing the Function object.
functionArn (string) --
The Amazon Resource Name (ARN) of the Function object.
name (string) --
The name of the Function object.
description (string) --
The Function description.
dataSourceName (string) --
The name of the DataSource.
requestMappingTemplate (string) --
The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
responseMappingTemplate (string) --
The Function response mapping template.
functionVersion (string) --
The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.
syncConfig (dict) --
Describes a Sync configuration for a resolver.
Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
AUTOMERGE: Resolve conflicts with the Automerge conflict resolution strategy.
LAMBDA: Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig.
conflictDetection (string) --
The Conflict Detection strategy to use.
VERSION: Detect conflicts based on object versions for this resolver.
NONE: Do not detect conflicts when invoking this resolver.
lambdaConflictHandlerConfig (dict) --
The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.
lambdaConflictHandlerArn (string) --
The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
maxBatchSize (integer) --
The maximum batching size for a resolver.
{'maxBatchSize': 'integer'}Response
{'resolver': {'maxBatchSize': 'integer'}}
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
Request Syntax
client.create_resolver( apiId='string', typeName='string', fieldName='string', dataSourceName='string', requestMappingTemplate='string', responseMappingTemplate='string', kind='UNIT'|'PIPELINE', pipelineConfig={ 'functions': [ 'string', ] }, syncConfig={ 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } }, cachingConfig={ 'ttl': 123, 'cachingKeys': [ 'string', ] }, maxBatchSize=123 )
string
[REQUIRED]
The ID for the GraphQL API for which the resolver is being created.
string
[REQUIRED]
The name of the Type.
string
[REQUIRED]
The name of the field to attach the resolver to.
string
The name of the data source for which the resolver is being created.
string
The mapping template to use 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 an Lambda data source. For all other data sources, VTL request and response mapping templates are required.
string
The mapping template to use for responses from the data source.
string
The resolver type.
UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
PIPELINE: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
dict
The PipelineConfig.
functions (list) --
A list of Function objects.
(string) --
dict
The SyncConfig for a resolver attached to a versioned data source.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
AUTOMERGE: Resolve conflicts with the Automerge conflict resolution strategy.
LAMBDA: Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig.
conflictDetection (string) --
The Conflict Detection strategy to use.
VERSION: Detect conflicts based on object versions for this resolver.
NONE: Do not detect conflicts when invoking this resolver.
lambdaConflictHandlerConfig (dict) --
The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.
lambdaConflictHandlerArn (string) --
The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
dict
The caching configuration for the resolver.
ttl (integer) --
The TTL in seconds for a resolver that has caching activated.
Valid values are 1–3,600 seconds.
cachingKeys (list) --
The caching keys for a resolver that has caching activated.
Valid values are entries from the $context.arguments, $context.source, and $context.identity maps.
(string) --
integer
The maximum batching size for a resolver.
dict
Response Syntax
{ 'resolver': { 'typeName': 'string', 'fieldName': 'string', 'dataSourceName': 'string', 'resolverArn': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'kind': 'UNIT'|'PIPELINE', 'pipelineConfig': { 'functions': [ 'string', ] }, 'syncConfig': { 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } }, 'cachingConfig': { 'ttl': 123, 'cachingKeys': [ 'string', ] }, 'maxBatchSize': 123 } }
Response Structure
(dict) --
resolver (dict) --
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 Amazon Resource Name (ARN).
requestMappingTemplate (string) --
The request mapping template.
responseMappingTemplate (string) --
The response mapping template.
kind (string) --
The resolver type.
UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
PIPELINE: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
pipelineConfig (dict) --
The PipelineConfig.
functions (list) --
A list of Function objects.
(string) --
syncConfig (dict) --
The SyncConfig for a resolver attached to a versioned data source.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
AUTOMERGE: Resolve conflicts with the Automerge conflict resolution strategy.
LAMBDA: Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig.
conflictDetection (string) --
The Conflict Detection strategy to use.
VERSION: Detect conflicts based on object versions for this resolver.
NONE: Do not detect conflicts when invoking this resolver.
lambdaConflictHandlerConfig (dict) --
The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.
lambdaConflictHandlerArn (string) --
The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
cachingConfig (dict) --
The caching configuration for the resolver.
ttl (integer) --
The TTL in seconds for a resolver that has caching activated.
Valid values are 1–3,600 seconds.
cachingKeys (list) --
The caching keys for a resolver that has caching activated.
Valid values are entries from the $context.arguments, $context.source, and $context.identity maps.
(string) --
maxBatchSize (integer) --
The maximum batching size for a resolver.
{'functionConfiguration': {'maxBatchSize': 'integer'}}
Get a Function.
See also: AWS API Documentation
Request Syntax
client.get_function( apiId='string', functionId='string' )
string
[REQUIRED]
The GraphQL API ID.
string
[REQUIRED]
The Function ID.
dict
Response Syntax
{ 'functionConfiguration': { 'functionId': 'string', 'functionArn': 'string', 'name': 'string', 'description': 'string', 'dataSourceName': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'functionVersion': 'string', 'syncConfig': { 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } }, 'maxBatchSize': 123 } }
Response Structure
(dict) --
functionConfiguration (dict) --
The Function object.
functionId (string) --
A unique ID representing the Function object.
functionArn (string) --
The Amazon Resource Name (ARN) of the Function object.
name (string) --
The name of the Function object.
description (string) --
The Function description.
dataSourceName (string) --
The name of the DataSource.
requestMappingTemplate (string) --
The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
responseMappingTemplate (string) --
The Function response mapping template.
functionVersion (string) --
The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.
syncConfig (dict) --
Describes a Sync configuration for a resolver.
Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
AUTOMERGE: Resolve conflicts with the Automerge conflict resolution strategy.
LAMBDA: Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig.
conflictDetection (string) --
The Conflict Detection strategy to use.
VERSION: Detect conflicts based on object versions for this resolver.
NONE: Do not detect conflicts when invoking this resolver.
lambdaConflictHandlerConfig (dict) --
The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.
lambdaConflictHandlerArn (string) --
The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
maxBatchSize (integer) --
The maximum batching size for a resolver.
{'resolver': {'maxBatchSize': 'integer'}}
Retrieves a Resolver object.
See also: AWS API Documentation
Request Syntax
client.get_resolver( apiId='string', typeName='string', fieldName='string' )
string
[REQUIRED]
The API ID.
string
[REQUIRED]
The resolver type name.
string
[REQUIRED]
The resolver field name.
dict
Response Syntax
{ 'resolver': { 'typeName': 'string', 'fieldName': 'string', 'dataSourceName': 'string', 'resolverArn': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'kind': 'UNIT'|'PIPELINE', 'pipelineConfig': { 'functions': [ 'string', ] }, 'syncConfig': { 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } }, 'cachingConfig': { 'ttl': 123, 'cachingKeys': [ 'string', ] }, 'maxBatchSize': 123 } }
Response Structure
(dict) --
resolver (dict) --
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 Amazon Resource Name (ARN).
requestMappingTemplate (string) --
The request mapping template.
responseMappingTemplate (string) --
The response mapping template.
kind (string) --
The resolver type.
UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
PIPELINE: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
pipelineConfig (dict) --
The PipelineConfig.
functions (list) --
A list of Function objects.
(string) --
syncConfig (dict) --
The SyncConfig for a resolver attached to a versioned data source.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
AUTOMERGE: Resolve conflicts with the Automerge conflict resolution strategy.
LAMBDA: Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig.
conflictDetection (string) --
The Conflict Detection strategy to use.
VERSION: Detect conflicts based on object versions for this resolver.
NONE: Do not detect conflicts when invoking this resolver.
lambdaConflictHandlerConfig (dict) --
The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.
lambdaConflictHandlerArn (string) --
The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
cachingConfig (dict) --
The caching configuration for the resolver.
ttl (integer) --
The TTL in seconds for a resolver that has caching activated.
Valid values are 1–3,600 seconds.
cachingKeys (list) --
The caching keys for a resolver that has caching activated.
Valid values are entries from the $context.arguments, $context.source, and $context.identity maps.
(string) --
maxBatchSize (integer) --
The maximum batching size for a resolver.
{'functions': {'maxBatchSize': 'integer'}}
List multiple functions.
See also: AWS API Documentation
Request Syntax
client.list_functions( apiId='string', nextToken='string', maxResults=123 )
string
[REQUIRED]
The GraphQL API ID.
string
An identifier that was returned from the previous call to this operation, which you can use to return the next set of items in the list.
integer
The maximum number of results that you want the request to return.
dict
Response Syntax
{ 'functions': [ { 'functionId': 'string', 'functionArn': 'string', 'name': 'string', 'description': 'string', 'dataSourceName': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'functionVersion': 'string', 'syncConfig': { 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } }, 'maxBatchSize': 123 }, ], 'nextToken': 'string' }
Response Structure
(dict) --
functions (list) --
A list of Function objects.
(dict) --
A function is a reusable entity. You can use multiple functions to compose the resolver logic.
functionId (string) --
A unique ID representing the Function object.
functionArn (string) --
The Amazon Resource Name (ARN) of the Function object.
name (string) --
The name of the Function object.
description (string) --
The Function description.
dataSourceName (string) --
The name of the DataSource.
requestMappingTemplate (string) --
The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
responseMappingTemplate (string) --
The Function response mapping template.
functionVersion (string) --
The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.
syncConfig (dict) --
Describes a Sync configuration for a resolver.
Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
AUTOMERGE: Resolve conflicts with the Automerge conflict resolution strategy.
LAMBDA: Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig.
conflictDetection (string) --
The Conflict Detection strategy to use.
VERSION: Detect conflicts based on object versions for this resolver.
NONE: Do not detect conflicts when invoking this resolver.
lambdaConflictHandlerConfig (dict) --
The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.
lambdaConflictHandlerArn (string) --
The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
maxBatchSize (integer) --
The maximum batching size for a resolver.
nextToken (string) --
An identifier that was returned from the previous call to this operation, which you can use to return the next set of items in the list.
{'resolvers': {'maxBatchSize': 'integer'}}
Lists the resolvers for a given API and type.
See also: AWS API Documentation
Request Syntax
client.list_resolvers( apiId='string', typeName='string', nextToken='string', maxResults=123 )
string
[REQUIRED]
The API ID.
string
[REQUIRED]
The type name.
string
An identifier that was returned from the previous call to this operation, which you can use to return the next set of items in the list.
integer
The maximum number of results that you want the request to return.
dict
Response Syntax
{ 'resolvers': [ { 'typeName': 'string', 'fieldName': 'string', 'dataSourceName': 'string', 'resolverArn': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'kind': 'UNIT'|'PIPELINE', 'pipelineConfig': { 'functions': [ 'string', ] }, 'syncConfig': { 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } }, 'cachingConfig': { 'ttl': 123, 'cachingKeys': [ 'string', ] }, 'maxBatchSize': 123 }, ], 'nextToken': 'string' }
Response Structure
(dict) --
resolvers (list) --
The Resolver objects.
(dict) --
Describes a resolver.
typeName (string) --
The resolver type name.
fieldName (string) --
The resolver field name.
dataSourceName (string) --
The resolver data source name.
resolverArn (string) --
The resolver Amazon Resource Name (ARN).
requestMappingTemplate (string) --
The request mapping template.
responseMappingTemplate (string) --
The response mapping template.
kind (string) --
The resolver type.
UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
PIPELINE: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
pipelineConfig (dict) --
The PipelineConfig.
functions (list) --
A list of Function objects.
(string) --
syncConfig (dict) --
The SyncConfig for a resolver attached to a versioned data source.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
AUTOMERGE: Resolve conflicts with the Automerge conflict resolution strategy.
LAMBDA: Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig.
conflictDetection (string) --
The Conflict Detection strategy to use.
VERSION: Detect conflicts based on object versions for this resolver.
NONE: Do not detect conflicts when invoking this resolver.
lambdaConflictHandlerConfig (dict) --
The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.
lambdaConflictHandlerArn (string) --
The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
cachingConfig (dict) --
The caching configuration for the resolver.
ttl (integer) --
The TTL in seconds for a resolver that has caching activated.
Valid values are 1–3,600 seconds.
cachingKeys (list) --
The caching keys for a resolver that has caching activated.
Valid values are entries from the $context.arguments, $context.source, and $context.identity maps.
(string) --
maxBatchSize (integer) --
The maximum batching size for a resolver.
nextToken (string) --
An identifier to pass in the next request to this operation to return the next set of items in the list.
{'resolvers': {'maxBatchSize': 'integer'}}
List the resolvers that are associated with a specific function.
See also: AWS API Documentation
Request Syntax
client.list_resolvers_by_function( apiId='string', functionId='string', nextToken='string', maxResults=123 )
string
[REQUIRED]
The API ID.
string
[REQUIRED]
The function ID.
string
An identifier that was returned from the previous call to this operation, which you can use to return the next set of items in the list.
integer
The maximum number of results that you want the request to return.
dict
Response Syntax
{ 'resolvers': [ { 'typeName': 'string', 'fieldName': 'string', 'dataSourceName': 'string', 'resolverArn': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'kind': 'UNIT'|'PIPELINE', 'pipelineConfig': { 'functions': [ 'string', ] }, 'syncConfig': { 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } }, 'cachingConfig': { 'ttl': 123, 'cachingKeys': [ 'string', ] }, 'maxBatchSize': 123 }, ], 'nextToken': 'string' }
Response Structure
(dict) --
resolvers (list) --
The list of resolvers.
(dict) --
Describes a resolver.
typeName (string) --
The resolver type name.
fieldName (string) --
The resolver field name.
dataSourceName (string) --
The resolver data source name.
resolverArn (string) --
The resolver Amazon Resource Name (ARN).
requestMappingTemplate (string) --
The request mapping template.
responseMappingTemplate (string) --
The response mapping template.
kind (string) --
The resolver type.
UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
PIPELINE: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
pipelineConfig (dict) --
The PipelineConfig.
functions (list) --
A list of Function objects.
(string) --
syncConfig (dict) --
The SyncConfig for a resolver attached to a versioned data source.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
AUTOMERGE: Resolve conflicts with the Automerge conflict resolution strategy.
LAMBDA: Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig.
conflictDetection (string) --
The Conflict Detection strategy to use.
VERSION: Detect conflicts based on object versions for this resolver.
NONE: Do not detect conflicts when invoking this resolver.
lambdaConflictHandlerConfig (dict) --
The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.
lambdaConflictHandlerArn (string) --
The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
cachingConfig (dict) --
The caching configuration for the resolver.
ttl (integer) --
The TTL in seconds for a resolver that has caching activated.
Valid values are 1–3,600 seconds.
cachingKeys (list) --
The caching keys for a resolver that has caching activated.
Valid values are entries from the $context.arguments, $context.source, and $context.identity maps.
(string) --
maxBatchSize (integer) --
The maximum batching size for a resolver.
nextToken (string) --
An identifier that you can use to return the next set of items in the list.
{'maxBatchSize': 'integer'}Response
{'functionConfiguration': {'maxBatchSize': 'integer'}}
Updates a Function object.
See also: AWS API Documentation
Request Syntax
client.update_function( apiId='string', name='string', description='string', functionId='string', dataSourceName='string', requestMappingTemplate='string', responseMappingTemplate='string', functionVersion='string', syncConfig={ 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } }, maxBatchSize=123 )
string
[REQUIRED]
The GraphQL API ID.
string
[REQUIRED]
The Function name.
string
The Function description.
string
[REQUIRED]
The function ID.
string
[REQUIRED]
The Function DataSource name.
string
The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
string
The Function request mapping template.
string
[REQUIRED]
The version of the request mapping template. Currently, the supported value is 2018-05-29.
dict
Describes a Sync configuration for a resolver.
Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
AUTOMERGE: Resolve conflicts with the Automerge conflict resolution strategy.
LAMBDA: Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig.
conflictDetection (string) --
The Conflict Detection strategy to use.
VERSION: Detect conflicts based on object versions for this resolver.
NONE: Do not detect conflicts when invoking this resolver.
lambdaConflictHandlerConfig (dict) --
The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.
lambdaConflictHandlerArn (string) --
The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
integer
The maximum batching size for a resolver.
dict
Response Syntax
{ 'functionConfiguration': { 'functionId': 'string', 'functionArn': 'string', 'name': 'string', 'description': 'string', 'dataSourceName': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'functionVersion': 'string', 'syncConfig': { 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } }, 'maxBatchSize': 123 } }
Response Structure
(dict) --
functionConfiguration (dict) --
The Function object.
functionId (string) --
A unique ID representing the Function object.
functionArn (string) --
The Amazon Resource Name (ARN) of the Function object.
name (string) --
The name of the Function object.
description (string) --
The Function description.
dataSourceName (string) --
The name of the DataSource.
requestMappingTemplate (string) --
The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
responseMappingTemplate (string) --
The Function response mapping template.
functionVersion (string) --
The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.
syncConfig (dict) --
Describes a Sync configuration for a resolver.
Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
AUTOMERGE: Resolve conflicts with the Automerge conflict resolution strategy.
LAMBDA: Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig.
conflictDetection (string) --
The Conflict Detection strategy to use.
VERSION: Detect conflicts based on object versions for this resolver.
NONE: Do not detect conflicts when invoking this resolver.
lambdaConflictHandlerConfig (dict) --
The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.
lambdaConflictHandlerArn (string) --
The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
maxBatchSize (integer) --
The maximum batching size for a resolver.
{'maxBatchSize': 'integer'}Response
{'resolver': {'maxBatchSize': 'integer'}}
Updates a Resolver object.
See also: AWS API Documentation
Request Syntax
client.update_resolver( apiId='string', typeName='string', fieldName='string', dataSourceName='string', requestMappingTemplate='string', responseMappingTemplate='string', kind='UNIT'|'PIPELINE', pipelineConfig={ 'functions': [ 'string', ] }, syncConfig={ 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } }, cachingConfig={ 'ttl': 123, 'cachingKeys': [ 'string', ] }, maxBatchSize=123 )
string
[REQUIRED]
The API ID.
string
[REQUIRED]
The new type name.
string
[REQUIRED]
The new field name.
string
The new data source name.
string
The new request mapping template.
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 an Lambda data source. For all other data sources, VTL request and response mapping templates are required.
string
The new response mapping template.
string
The resolver type.
UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
PIPELINE: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
dict
The PipelineConfig.
functions (list) --
A list of Function objects.
(string) --
dict
The SyncConfig for a resolver attached to a versioned data source.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
AUTOMERGE: Resolve conflicts with the Automerge conflict resolution strategy.
LAMBDA: Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig.
conflictDetection (string) --
The Conflict Detection strategy to use.
VERSION: Detect conflicts based on object versions for this resolver.
NONE: Do not detect conflicts when invoking this resolver.
lambdaConflictHandlerConfig (dict) --
The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.
lambdaConflictHandlerArn (string) --
The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
dict
The caching configuration for the resolver.
ttl (integer) --
The TTL in seconds for a resolver that has caching activated.
Valid values are 1–3,600 seconds.
cachingKeys (list) --
The caching keys for a resolver that has caching activated.
Valid values are entries from the $context.arguments, $context.source, and $context.identity maps.
(string) --
integer
The maximum batching size for a resolver.
dict
Response Syntax
{ 'resolver': { 'typeName': 'string', 'fieldName': 'string', 'dataSourceName': 'string', 'resolverArn': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'kind': 'UNIT'|'PIPELINE', 'pipelineConfig': { 'functions': [ 'string', ] }, 'syncConfig': { 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } }, 'cachingConfig': { 'ttl': 123, 'cachingKeys': [ 'string', ] }, 'maxBatchSize': 123 } }
Response Structure
(dict) --
resolver (dict) --
The updated 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 Amazon Resource Name (ARN).
requestMappingTemplate (string) --
The request mapping template.
responseMappingTemplate (string) --
The response mapping template.
kind (string) --
The resolver type.
UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
PIPELINE: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
pipelineConfig (dict) --
The PipelineConfig.
functions (list) --
A list of Function objects.
(string) --
syncConfig (dict) --
The SyncConfig for a resolver attached to a versioned data source.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
AUTOMERGE: Resolve conflicts with the Automerge conflict resolution strategy.
LAMBDA: Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig.
conflictDetection (string) --
The Conflict Detection strategy to use.
VERSION: Detect conflicts based on object versions for this resolver.
NONE: Do not detect conflicts when invoking this resolver.
lambdaConflictHandlerConfig (dict) --
The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.
lambdaConflictHandlerArn (string) --
The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.
cachingConfig (dict) --
The caching configuration for the resolver.
ttl (integer) --
The TTL in seconds for a resolver that has caching activated.
Valid values are 1–3,600 seconds.
cachingKeys (list) --
The caching keys for a resolver that has caching activated.
Valid values are entries from the $context.arguments, $context.source, and $context.identity maps.
(string) --
maxBatchSize (integer) --
The maximum batching size for a resolver.