FieldOptions

class aws_cdk.aws_appsync.FieldOptions(*, return_type, args=None, directives=None)

Bases: object

(experimental) Properties for configuring a field.

Parameters:
  • 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

Options:

args - the variables and types that define the arguments

i.e. { string: GraphqlType, string: GraphqlType } :exampleMetadata: infused

Example:

field = appsync.Field(
    return_type=appsync.GraphqlType.string(),
    args={
        "argument": appsync.GraphqlType.string()
    }
)
type = appsync.InterfaceType("Node",
    definition={"test": field}
)

Attributes

args

(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

Stability:

experimental

directives

(experimental) the directives for this field.

Default:
  • no directives

Stability:

experimental

return_type

(experimental) The return type for this field.

Stability:

experimental