Skip to content
New issue

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

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

Already on GitHub? # to your account

Missing mention of Type can only refer to Input Object types in field arguments #447

Closed
tinganho opened this issue May 21, 2018 · 4 comments

Comments

@tinganho
Copy link

In the section 3.6.1 Field Arguments: http://facebook.github.io/graphql/draft/#sec-Field-Arguments

Object fields are conceptually functions which yield values. Occasionally object fields can accept arguments to further specify the return value. Object field arguments are defined as a list of all possible argument names and their expected input types.

All arguments defined within a field must not have a name which begins with "__" (two underscores), as this is used exclusively by GraphQL’s introspection system.

For example, a Person type with a picture field could accept an argument to determine what size of an image to return.

It misses to mention that if a Type is a NamedType it can only refer to the name of an input object type.

@IvanGoncharov
Copy link
Member

It misses to mention that if a Type is a NamedType it can only refer to the name of an input object type.

@tinganho Actually no, also you can use scalars both standard (String, Int, ...) and custom. That's why specification uses input type term for everything that can be used as an argument:

list of all possible argument names and their expected input types.

@tinganho
Copy link
Author

OK, I might put too much restriction. But all types except Object types?
http://facebook.github.io/graphql/draft/#sec-Objects

But if this sentence is clear enough, then I'm fine to close:

list of all possible argument names and their expected input types.

@IvanGoncharov
Copy link
Member

OK, I might put too much restriction. But all types except Object types?

Except for Object types, interfaces and unions and the same types wrapped in List and NonNull.
That's why input type term consistently used in specification text.

But if this sentence is clear enough, then I'm fine to close:

I think input type sounds very similar to input object but I can't think of a better alternative.

@leebyron
Copy link
Collaborator

I think we mention this elsewhere, but it's hard to find a consistent reference to link to which I think we should improve

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants