Skip to content

CreateResolverRequest

Source code in docs_src/capo_appsync/types/create_resolver_request.py
class CreateResolverRequest(TypedDict, closed=True):
    api_id: "capo_appsync.types.string.String"
    """<p>The ID for the GraphQL API for which the resolver is being created.</p>"""
    type_name: "capo_appsync.types.resource_name.ResourceName"
    """<p>The name of the <code>Type</code>.</p>"""
    field_name: "capo_appsync.types.resource_name.ResourceName"
    """<p>The name of the field to attach the resolver to.</p>"""
    data_source_name: NotRequired["capo_appsync.types.resource_name.ResourceName"]
    """<p>The name of the data source for which the resolver is being created.</p>"""
    request_mapping_template: NotRequired[
        "capo_appsync.types.mapping_template.MappingTemplate"
    ]
    """<p>The mapping template to use for requests.</p> <p>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).</p> <p>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.</p>"""
    response_mapping_template: NotRequired[
        "capo_appsync.types.mapping_template.MappingTemplate"
    ]
    """<p>The mapping template to use for responses from the data source.</p>"""
    kind: NotRequired["capo_appsync.types.resolver_kind.ResolverKind"]
    """<p>The resolver type.</p> <ul> <li> <p> <b>UNIT</b>: 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.</p> </li> <li> <p> <b>PIPELINE</b>: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of <code>Function</code> objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.</p> </li> </ul>"""
    pipeline_config: NotRequired["capo_appsync.types.pipeline_config.PipelineConfig"]
    """<p>The <code>PipelineConfig</code>.</p>"""
    sync_config: NotRequired["capo_appsync.types.sync_config.SyncConfig"]
    """<p>The <code>SyncConfig</code> for a resolver attached to a versioned data source.</p>"""
    caching_config: NotRequired["capo_appsync.types.caching_config.CachingConfig"]
    """<p>The caching configuration for the resolver.</p>"""
    max_batch_size: "capo_appsync.types.max_batch_size.MaxBatchSize"
    """<p>The maximum batching size for a resolver.</p>"""
    runtime: NotRequired["capo_appsync.types.app_sync_runtime.AppSyncRuntime"]
    code: NotRequired["capo_appsync.types.code.Code"]
    """<p>The <code>resolver</code> code that contains the request and response functions. When code is used, the <code>runtime</code> is required. The <code>runtime</code> value must be <code>APPSYNC_JS</code>.</p>"""
    metrics_config: NotRequired[
        "capo_appsync.types.resolver_level_metrics_config.ResolverLevelMetricsConfig"
    ]
    """<p>Enables or disables enhanced resolver metrics for specified resolvers. Note that <code>metricsConfig</code> won't be used unless the <code>resolverLevelMetricsBehavior</code> value is set to <code>PER_RESOLVER_METRICS</code>. If the <code>resolverLevelMetricsBehavior</code> is set to <code>FULL_REQUEST_RESOLVER_METRICS</code> instead, <code>metricsConfig</code> will be ignored. However, you can still set its value.</p> <p> <code>metricsConfig</code> can be <code>ENABLED</code> or <code>DISABLED</code>.</p>"""

api_id instance-attribute

api_id: String

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

caching_config instance-attribute

caching_config: NotRequired[CachingConfig]

The caching configuration for the resolver.

code instance-attribute

code: NotRequired[Code]

The resolver code that contains the request and response functions. When code is used, the runtime is required. The runtime value must be APPSYNC_JS.

data_source_name instance-attribute

data_source_name: NotRequired[ResourceName]

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

field_name instance-attribute

field_name: ResourceName

The name of the field to attach the resolver to.

kind instance-attribute

kind: NotRequired[ResolverKind]

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.

max_batch_size instance-attribute

max_batch_size: MaxBatchSize

The maximum batching size for a resolver.

metrics_config instance-attribute

metrics_config: NotRequired[ResolverLevelMetricsConfig]

Enables or disables enhanced resolver metrics for specified resolvers. Note that metricsConfig won't be used unless the resolverLevelMetricsBehavior value is set to PER_RESOLVER_METRICS. If the resolverLevelMetricsBehavior is set to FULL_REQUEST_RESOLVER_METRICS instead, metricsConfig will be ignored. However, you can still set its value.

metricsConfig can be ENABLED or DISABLED.

pipeline_config instance-attribute

pipeline_config: NotRequired[PipelineConfig]

The PipelineConfig.

request_mapping_template instance-attribute

request_mapping_template: NotRequired[MappingTemplate]

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.

response_mapping_template instance-attribute

response_mapping_template: NotRequired[MappingTemplate]

The mapping template to use for responses from the data source.

runtime instance-attribute

runtime: NotRequired[AppSyncRuntime]

sync_config instance-attribute

sync_config: NotRequired[SyncConfig]

The SyncConfig for a resolver attached to a versioned data source.

type_name instance-attribute

type_name: ResourceName

The name of the Type.