Skip to content

Commit f29fbcd

Browse files
authored
gpt guided style guide improvements (#1190)
1 parent 0157a79 commit f29fbcd

10 files changed

+105
-95
lines changed

STYLE_GUIDE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,13 @@ meaning.
126126
✅ “A query must contain a single root operation type.”
127127

128128
❌ “A query MUST contain a single root operation type.”
129+
130+
**Avoid unnecessary hyphenation**
131+
132+
Only use hypenated compound words when either commonly used elsewhere in english
133+
or technical writing. Otherwise prefer separate words or a non-hyphenated
134+
compound word, whichever is most commonly accepted.
135+
136+
✅ User defined shorthand words are separated by whitespace
137+
138+
❌ User-defined short-hand words are separated by white-space

spec/Appendix A -- Conformance.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ in lowercase and still retain their meaning unless explicitly declared as
1212
non-normative.
1313

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

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

4747
```example
4848
This is an example of a non-normative example.
4949
```
5050

5151
```counter-example
52-
This is an example of a non-normative counter-example.
52+
This is an example of a non-normative counterexample.
5353
```
5454

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

6060
Note: This is an example of a non-normative note.

spec/Appendix B -- Notation Conventions.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ambiguity.
1111

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

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

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

@@ -46,14 +46,14 @@ ListOfLetterA :
4646
- ListOfLetterA `a`
4747
- `a`
4848

49-
## Lexical and Syntactical Grammar
49+
## Lexical and Syntactic Grammar
5050

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

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

6464
Word :: Letter+
6565

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

7171
Sentence : Word+ `.`
7272

7373
## Grammar Notation
7474

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

8080
**Constraints**

spec/Appendix C -- Grammar Summary.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ SourceCharacter :: "Any Unicode scalar value"
99
Ignored ::
1010

1111
- UnicodeBOM
12-
- WhiteSpace
12+
- Whitespace
1313
- LineTerminator
1414
- Comment
1515
- Comma
1616

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

19-
WhiteSpace ::
19+
Whitespace ::
2020

2121
- "Horizontal Tab (U+0009)"
2222
- "Space (U+0020)"

0 commit comments

Comments
 (0)