Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input Objects Example is Invalid #272

Closed
schloerke opened this issue Feb 28, 2017 · 1 comment
Closed

Input Objects Example is Invalid #272

schloerke opened this issue Feb 28, 2017 · 1 comment

Comments

@schloerke
Copy link

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

@andimarek
Copy link
Contributor

This PR #311 removes the wrong example.

leebyron added a commit that referenced this issue Dec 1, 2017
This section had some redundancy and confusing statements in addition to some outdated examples for coercing field values.

This rewrite expands on the examples and consolidates the coercion rules.

Fixes #272
Closes #311
leebyron added a commit that referenced this issue Dec 6, 2017
This section had some redundancy and confusing statements in addition to some outdated examples for coercing field values.

This rewrite expands on the examples and consolidates the coercion rules.

Fixes #272
Closes #311
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants