Skip to content
Merged
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
10 changes: 10 additions & 0 deletions STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,13 @@ meaning.
✅ “A query must contain a single root operation type.”

❌ “A query MUST contain a single root operation type.”

**Avoid unnecessary hyphenation**

Only use hypenated compound words when either commonly used elsewhere in english
or technical writing. Otherwise prefer separate words or a non-hyphenated
compound word, whichever is most commonly accepted.

✅ User defined shorthand words are separated by whitespace

❌ User-defined short-hand words are separated by white-space
12 changes: 6 additions & 6 deletions spec/Appendix A -- Conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ in lowercase and still retain their meaning unless explicitly declared as
non-normative.

A conforming implementation of GraphQL may provide additional functionality, but
must not where explicitly disallowed or would otherwise result in
must not do so where explicitly disallowed or where it would otherwise result in
non-conformance.

**Conforming Algorithms**
Expand Down Expand Up @@ -42,19 +42,19 @@ as non-normative.
Examples in this document are non-normative, and are presented to aid
understanding of introduced concepts and the behavior of normative portions of
the specification. Examples are either introduced explicitly in prose (e.g. "for
example") or are set apart in example or counter-example blocks, like this:
example") or are set apart in example or counterexample blocks, like this:

```example
This is an example of a non-normative example.
```

```counter-example
This is an example of a non-normative counter-example.
This is an example of a non-normative counterexample.
```

Notes in this document are non-normative, and are presented to clarify intent,
draw attention to potential edge-cases and pit-falls, and answer common
questions that arise during implementation. Notes are either introduced
explicitly in prose (e.g. "Note: ") or are set apart in a note block, like this:
draw attention to potential edge cases and pitfalls, and answer common questions
that arise during implementation. Notes are either introduced explicitly in
prose (e.g. "Note: ") or are set apart in a note block, like this:

Note: This is an example of a non-normative note.
20 changes: 10 additions & 10 deletions spec/Appendix B -- Notation Conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ambiguity.

A context-free grammar consists of a number of productions. Each production has
an abstract symbol called a "non-terminal" as its left-hand side, and zero or
more possible sequences of non-terminal symbols and or terminal characters as
more possible sequences of non-terminal symbols and/or terminal characters as
its right-hand side.

Starting from a single goal non-terminal symbol, a context-free grammar
Expand All @@ -21,8 +21,8 @@ of the sequences it is defined by, until all non-terminal symbols have been
replaced by terminal characters.

Terminals are represented in this document in a monospace font in two forms: a
specific Unicode character or sequence of Unicode characters (ie. {`=`} or
{`terminal`}), and prose typically describing a specific Unicode code-point
specific Unicode character or sequence of Unicode characters (i.e. {`=`} or
{`terminal`}), and prose typically describing a specific Unicode code point
{"Space (U+0020)"}. Sequences of Unicode characters only appear in syntactic
grammars and represent a {Name} token of that specific sequence.

Expand All @@ -46,14 +46,14 @@ ListOfLetterA :
- ListOfLetterA `a`
- `a`

## Lexical and Syntactical Grammar
## Lexical and Syntactic Grammar

The GraphQL language is defined in a syntactic grammar where terminal symbols
are tokens. Tokens are defined in a lexical grammar which matches patterns of
source characters. The result of parsing a source text sequence of Unicode
characters first produces a sequence of lexical tokens according to the lexical
grammar which then produces abstract syntax tree (AST) according to the
syntactical grammar.
syntactic grammar.

A lexical grammar production describes non-terminal "tokens" by patterns of
terminal Unicode characters. No "whitespace" or other ignored characters may
Expand All @@ -63,18 +63,18 @@ definition.

Word :: Letter+

A Syntactical grammar production describes non-terminal "rules" by patterns of
terminal Tokens. {WhiteSpace} and other {Ignored} sequences may appear before or
after any terminal {Token}. A syntactical grammar production is distinguished by
a one colon `:` definition.
A Syntactic grammar production describes non-terminal "rules" by patterns of
terminal Tokens. {Whitespace} and other {Ignored} sequences may appear before or
after any terminal {Token}. A syntactic grammar production is distinguished by a
one colon `:` definition.

Sentence : Word+ `.`

## Grammar Notation

This specification uses some additional notation to describe common patterns,
such as optional or repeated patterns, or parameterized alterations of the
definition of a non-terminal. This section explains these short-hand notations
definition of a non-terminal. This section explains these shorthand notations
and their expanded definitions in the context-free grammar.

**Constraints**
Expand Down
4 changes: 2 additions & 2 deletions spec/Appendix C -- Grammar Summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ SourceCharacter :: "Any Unicode scalar value"
Ignored ::

- UnicodeBOM
- WhiteSpace
- Whitespace
- LineTerminator
- Comment
- Comma

UnicodeBOM :: "Byte Order Mark (U+FEFF)"

WhiteSpace ::
Whitespace ::

- "Horizontal Tab (U+0009)"
- "Space (U+0020)"
Expand Down
Loading