Skip to content

Input Objects Example is Invalid #272

Description

@schloerke

Hello,

Great document! Thank you!

I am parsing my way through the Input Object, Input Coercion section. It states input definition of

input ExampleInputObject {
  a: String
  b: Int!
}

and says an input of

{ 
  a: 123, 
  b: "123"
}

can be coerced into

{ 
  a: "123", 
  b: 123
}

.

I find this example to be impossible as the String Input Coercion does not allow for anything other than string inputs and the Int Input Coercion does not allow for anything other than Int inputs.

This type change would make sense if it was a return value, but it is an input, which is very rigid.

Also, if the Input Object Type Validation could be updated to include a comment about nullish values, that would be great.

Thank you,
Barret

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions