Interface CreateResolverRequest.Builder

    • Method Detail

      • apiId

        CreateResolverRequest.Builder apiId​(String apiId)

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

        Parameters:
        apiId - The ID for the GraphQL API for which the resolver is being created.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • typeName

        CreateResolverRequest.Builder typeName​(String typeName)

        The name of the Type.

        Parameters:
        typeName - The name of the Type.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • fieldName

        CreateResolverRequest.Builder fieldName​(String fieldName)

        The name of the field to attach the resolver to.

        Parameters:
        fieldName - The name of the field to attach the resolver to.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • dataSourceName

        CreateResolverRequest.Builder dataSourceName​(String dataSourceName)

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

        Parameters:
        dataSourceName - The name of the data source for which the resolver is being created.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • requestMappingTemplate

        CreateResolverRequest.Builder requestMappingTemplate​(String requestMappingTemplate)

        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.

        Parameters:
        requestMappingTemplate - 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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • responseMappingTemplate

        CreateResolverRequest.Builder responseMappingTemplate​(String responseMappingTemplate)

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

        Parameters:
        responseMappingTemplate - The mapping template to use for responses from the data source.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • kind

        CreateResolverRequest.Builder kind​(String kind)

        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.

        Parameters:
        kind - 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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        ResolverKind, ResolverKind
      • kind

        CreateResolverRequest.Builder kind​(ResolverKind kind)

        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.

        Parameters:
        kind - 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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        ResolverKind, ResolverKind
      • pipelineConfig

        CreateResolverRequest.Builder pipelineConfig​(PipelineConfig pipelineConfig)

        The PipelineConfig.

        Parameters:
        pipelineConfig - The PipelineConfig.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • syncConfig

        CreateResolverRequest.Builder syncConfig​(SyncConfig syncConfig)

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

        Parameters:
        syncConfig - The SyncConfig for a resolver attached to a versioned data source.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • cachingConfig

        CreateResolverRequest.Builder cachingConfig​(CachingConfig cachingConfig)

        The caching configuration for the resolver.

        Parameters:
        cachingConfig - The caching configuration for the resolver.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • maxBatchSize

        CreateResolverRequest.Builder maxBatchSize​(Integer maxBatchSize)

        The maximum batching size for a resolver.

        Parameters:
        maxBatchSize - The maximum batching size for a resolver.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • runtime

        CreateResolverRequest.Builder runtime​(AppSyncRuntime runtime)
        Sets the value of the Runtime property for this object.
        Parameters:
        runtime - The new value for the Runtime property for this object.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • code

        CreateResolverRequest.Builder code​(String 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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.