Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion spec/Appendix B -- Grammar Summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ ObjectValue[Const] :
- { }
- { ObjectField[?Const]+ }

ObjectField[Const] : Name : Value[?Const]
ObjectField[Const] : Directives? Name : Value[?Const]

VariableDefinitions : ( VariableDefinition+ )

Expand Down Expand Up @@ -322,6 +322,7 @@ ExecutableDirectiveLocation : one of
`FRAGMENT_SPREAD`
`INLINE_FRAGMENT`
`VARIABLE_DEFINITION`
`OBJECT_FIELD`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that changes the meaning of FIELD location. Does new location make sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see how it changes anything about the FIELD location. FIELD and OBJECT_FIELD are unrelated. But I have a feeling I'm missing your point. Can you say more?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference between FIELD and OBJECT_FIELD ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIELD refers to a GraphQL field (see section 2.5 of the spec). OBJECT_FIELD refers to a GraphQL ObjectField (2.9.8). They have nothing to do with each other. If you look at the proposed grammar change, the directive is supposed before the Name element of the ObjectField.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid this confusion and make the spec easier to understand, it would be helpful to refer to the section in the spec where each of these items refer to. I will make a separate PR for that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Now I understand. At first I thought about something completely different.


TypeSystemDirectiveLocation : one of
`SCHEMA`
Expand Down
2 changes: 1 addition & 1 deletion spec/Section 2 -- Language.md
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ ObjectValue[Const] :
- { }
- { ObjectField[?Const]+ }

ObjectField[Const] : Name : Value[?Const]
ObjectField[Const] : Directives? Name : Value[?Const]

Input object literal values are unordered lists of keyed input values wrapped in
curly-braces `{ }`. The values of an object literal may be any input value
Expand Down
1 change: 1 addition & 0 deletions spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -1734,6 +1734,7 @@ ExecutableDirectiveLocation : one of
`FRAGMENT_SPREAD`
`INLINE_FRAGMENT`
`VARIABLE_DEFINITION`
`OBJECT_FIELD`

TypeSystemDirectiveLocation : one of
`SCHEMA`
Expand Down