ResolvableField

class aws_cdk.aws_appsync.ResolvableField(*, data_source=None, pipeline_config=None, request_mapping_template=None, response_mapping_template=None, return_type, args=None, directives=None)

Bases: Field

(experimental) Resolvable Fields build upon Graphql Types and provide fields that can resolve into operations on a data source.

Stability:

experimental

ExampleMetadata:

infused

Example:

# api: appsync.GraphqlApi
# dummy_request: appsync.MappingTemplate
# dummy_response: appsync.MappingTemplate

info = appsync.ObjectType("Info",
    definition={
        "node": appsync.ResolvableField(
            return_type=appsync.GraphqlType.string(),
            args={
                "id": appsync.GraphqlType.string()
            },
            data_source=api.add_none_data_source("none"),
            request_mapping_template=dummy_request,
            response_mapping_template=dummy_response
        )
    }
)
Parameters:
  • data_source (Optional[BaseDataSource]) – (experimental) The data source creating linked to this resolvable field. Default: - no data source

  • pipeline_config (Optional[Sequence[IAppsyncFunction]]) – (experimental) configuration of the pipeline resolver. Default: - no pipeline resolver configuration An empty array or undefined prop will set resolver to be of type unit

  • request_mapping_template (Optional[MappingTemplate]) – (experimental) The request mapping template for this resolver. Default: - No mapping template

  • response_mapping_template (Optional[MappingTemplate]) – (experimental) The response mapping template for this resolver. Default: - No mapping template

  • return_type (GraphqlType) – (experimental) The return type for this field.

  • args (Optional[Mapping[str, GraphqlType]]) – (experimental) The arguments for this field. i.e. type Example (first: String second: String) {} - where ‘first’ and ‘second’ are key values for args and ‘String’ is the GraphqlType Default: - no arguments

  • directives (Optional[Sequence[Directive]]) – (experimental) the directives for this field. Default: - no directives

Stability:

experimental

Methods

args_to_string()

(experimental) Generate the args string of this resolvable field.

Stability:

experimental

Return type:

str

directives_to_string(modes=None)

(experimental) Generate the directives for this field.

Parameters:

modes (Optional[Sequence[AuthorizationType]]) –

Stability:

experimental

Return type:

str

to_string()

(experimental) Generate the string for this attribute.

Stability:

experimental

Return type:

str

Attributes

field_options

(experimental) The options to make this field resolvable.

Default:
  • not a resolvable field

Stability:

experimental

intermediate_type

(experimental) the intermediate type linked to this attribute (i.e. an interface or an object).

Default:
  • no intermediate type

Stability:

experimental

is_list

(experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type].

Default:
  • false

Stability:

experimental

is_required

(experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! and this attribute must always have a value.

Default:
  • false

Stability:

experimental

is_required_list

(experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! and this attribute’s list must always have a value.

Default:
  • false

Stability:

experimental

type

(experimental) the type of attribute.

Stability:

experimental

Static Methods

classmethod aws_date(*, is_list=None, is_required=None, is_required_list=None)

(experimental) AWSDate scalar type represents a valid extended ISO 8601 Date string.

In other words, accepts date strings in the form of YYYY-MM-DD. It accepts time zone offsets.

Parameters:
  • is_list (Optional[bool]) – (experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type]. Default: - false

  • is_required (Optional[bool]) – (experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! Default: - false

  • is_required_list (Optional[bool]) – (experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]! Default: - false

Stability:

experimental

Return type:

GraphqlType

classmethod aws_date_time(*, is_list=None, is_required=None, is_required_list=None)

(experimental) AWSDateTime scalar type represents a valid extended ISO 8601 DateTime string.

In other words, accepts date strings in the form of YYYY-MM-DDThh:mm:ss.sssZ. It accepts time zone offsets.

Parameters:
  • is_list (Optional[bool]) – (experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type]. Default: - false

  • is_required (Optional[bool]) – (experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! Default: - false

  • is_required_list (Optional[bool]) – (experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]! Default: - false

Stability:

experimental

Return type:

GraphqlType

classmethod aws_email(*, is_list=None, is_required=None, is_required_list=None)

(experimental) AWSEmail scalar type represents an email address string (i.e.``username@example.com``).

Parameters:
  • is_list (Optional[bool]) – (experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type]. Default: - false

  • is_required (Optional[bool]) – (experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! Default: - false

  • is_required_list (Optional[bool]) – (experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]! Default: - false

Stability:

experimental

Return type:

GraphqlType

classmethod aws_ip_address(*, is_list=None, is_required=None, is_required_list=None)

(experimental) AWSIPAddress scalar type respresents a valid IPv4 of IPv6 address string.

Parameters:
  • is_list (Optional[bool]) – (experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type]. Default: - false

  • is_required (Optional[bool]) – (experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! Default: - false

  • is_required_list (Optional[bool]) – (experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]! Default: - false

Stability:

experimental

Return type:

GraphqlType

classmethod aws_json(*, is_list=None, is_required=None, is_required_list=None)

(experimental) AWSJson scalar type represents a JSON string.

Parameters:
  • is_list (Optional[bool]) – (experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type]. Default: - false

  • is_required (Optional[bool]) – (experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! Default: - false

  • is_required_list (Optional[bool]) – (experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]! Default: - false

Stability:

experimental

Return type:

GraphqlType

classmethod aws_phone(*, is_list=None, is_required=None, is_required_list=None)

(experimental) AWSPhone scalar type represents a valid phone number. Phone numbers maybe be whitespace delimited or hyphenated.

The number can specify a country code at the beginning, but is not required for US phone numbers.

Parameters:
  • is_list (Optional[bool]) – (experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type]. Default: - false

  • is_required (Optional[bool]) – (experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! Default: - false

  • is_required_list (Optional[bool]) – (experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]! Default: - false

Stability:

experimental

Return type:

GraphqlType

classmethod aws_time(*, is_list=None, is_required=None, is_required_list=None)

(experimental) AWSTime scalar type represents a valid extended ISO 8601 Time string.

In other words, accepts date strings in the form of hh:mm:ss.sss. It accepts time zone offsets.

Parameters:
  • is_list (Optional[bool]) – (experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type]. Default: - false

  • is_required (Optional[bool]) – (experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! Default: - false

  • is_required_list (Optional[bool]) – (experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]! Default: - false

Stability:

experimental

Return type:

GraphqlType

classmethod aws_timestamp(*, is_list=None, is_required=None, is_required_list=None)

(experimental) AWSTimestamp scalar type represents the number of seconds since 1970-01-01T00:00Z.

Timestamps are serialized and deserialized as numbers.

Parameters:
  • is_list (Optional[bool]) – (experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type]. Default: - false

  • is_required (Optional[bool]) – (experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! Default: - false

  • is_required_list (Optional[bool]) – (experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]! Default: - false

Stability:

experimental

Return type:

GraphqlType

classmethod aws_url(*, is_list=None, is_required=None, is_required_list=None)

(experimental) AWSURL scalar type represetns a valid URL string.

URLs wihtout schemes or contain double slashes are considered invalid.

Parameters:
  • is_list (Optional[bool]) – (experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type]. Default: - false

  • is_required (Optional[bool]) – (experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! Default: - false

  • is_required_list (Optional[bool]) – (experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]! Default: - false

Stability:

experimental

Return type:

GraphqlType

classmethod boolean(*, is_list=None, is_required=None, is_required_list=None)

(experimental) Boolean scalar type is a boolean value: true or false.

Parameters:
  • is_list (Optional[bool]) – (experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type]. Default: - false

  • is_required (Optional[bool]) – (experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! Default: - false

  • is_required_list (Optional[bool]) – (experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]! Default: - false

Stability:

experimental

Return type:

GraphqlType

classmethod float(*, is_list=None, is_required=None, is_required_list=None)

(experimental) Float scalar type is a signed double-precision fractional value.

Parameters:
  • is_list (Optional[bool]) – (experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type]. Default: - false

  • is_required (Optional[bool]) – (experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! Default: - false

  • is_required_list (Optional[bool]) – (experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]! Default: - false

Stability:

experimental

Return type:

GraphqlType

classmethod id(*, is_list=None, is_required=None, is_required_list=None)

(experimental) ID scalar type is a unique identifier. ID type is serialized similar to String.

Often used as a key for a cache and not intended to be human-readable.

Parameters:
  • is_list (Optional[bool]) – (experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type]. Default: - false

  • is_required (Optional[bool]) – (experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! Default: - false

  • is_required_list (Optional[bool]) – (experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]! Default: - false

Stability:

experimental

Return type:

GraphqlType

classmethod int(*, is_list=None, is_required=None, is_required_list=None)

(experimental) Int scalar type is a signed non-fractional numerical value.

Parameters:
  • is_list (Optional[bool]) – (experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type]. Default: - false

  • is_required (Optional[bool]) – (experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! Default: - false

  • is_required_list (Optional[bool]) – (experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]! Default: - false

Stability:

experimental

Return type:

GraphqlType

classmethod intermediate(*, intermediate_type=None, is_list=None, is_required=None, is_required_list=None)

(experimental) an intermediate type to be added as an attribute (i.e. an interface or an object type).

Parameters:
  • intermediate_type (Optional[IIntermediateType]) – (experimental) the intermediate type linked to this attribute. Default: - no intermediate type

  • is_list (Optional[bool]) – (experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type]. Default: - false

  • is_required (Optional[bool]) – (experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! Default: - false

  • is_required_list (Optional[bool]) – (experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]! Default: - false

Stability:

experimental

Return type:

GraphqlType

classmethod string(*, is_list=None, is_required=None, is_required_list=None)

(experimental) String scalar type is a free-form human-readable text.

Parameters:
  • is_list (Optional[bool]) – (experimental) property determining if this attribute is a list i.e. if true, attribute would be [Type]. Default: - false

  • is_required (Optional[bool]) – (experimental) property determining if this attribute is non-nullable i.e. if true, attribute would be Type! Default: - false

  • is_required_list (Optional[bool]) – (experimental) property determining if this attribute is a non-nullable list i.e. if true, attribute would be [ Type ]! or if isRequired true, attribe would be [ Type! ]! Default: - false

Stability:

experimental

Return type:

GraphqlType