GraphqlType

class aws_cdk.aws_appsync.GraphqlType(type, *, intermediate_type=None, is_list=None, is_required=None, is_required_list=None)

Bases: object

(experimental) The GraphQL Types in AppSync’s GraphQL.

GraphQL Types are the building blocks for object types, queries, mutations, etc. They are types like String, Int, Id or even Object Types you create.

i.e. String, String!, [String], [String!], [String]!

GraphQL Types are used to define the entirety of schema.

Stability

experimental

Parameters
  • type (Type) –

  • 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

Methods

args_to_string()

(experimental) Generate the arguments for this field.

Stability

experimental

Return type

str

directives_to_string(_modes=None)

(experimental) Generate the directives for this field.

Parameters

_modes (Optional[List[AuthorizationType]]) –

Stability

experimental

Return type

str

to_string()

(experimental) Generate the string for this attribute.

Stability

experimental

Return type

str

Attributes

intermediate_type

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

Default
  • no intermediate type

Stability

experimental

Return type

Optional[IIntermediateType]

is_list

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

Default
  • false

Stability

experimental

Return type

bool

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

Return type

bool

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

Return type

bool

type

(experimental) the type of attribute.

Stability

experimental

Return type

Type

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