Skip to content

Commit 3decba9

Browse files
bowmanbbbakerman
authored andcommitted
Match JSON capitalization with that used in GraphQLScalarType constructor
1 parent 8646821 commit 3decba9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

readme.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,19 @@ And example query might look like:
7474

7575
```
7676

77-
## Object / Json Scalars
77+
## Object / JSON Scalars
7878

7979
* `Object`
8080
* An object scalar that accepts any object as a scalar value
8181

82-
* `Json`
82+
* `JSON`
8383
* A synonym for the `Object` scalar, it will accept any object as a scalar value
8484

8585
One of the design goals of graphql, is that the type system describes the shape of the data returned.
8686

87-
The `Object` / `Json` scalars work against this some what because they can return compound values outside the type system. As such
87+
The `Object` / `JSON` scalars work against this some what because they can return compound values outside the type system. As such
8888
they should be used sparingly. In general your should aim to describe the data via the graphql type system where you can and only
89-
resort to the `Object` / `Json` scalars in very rare circumstances.
89+
resort to the `Object` / `JSON` scalars in very rare circumstances.
9090

9191
An example might be an extensible graphql system where systems can input custom metadata objects that cant be known at
9292
schema type design time.
@@ -97,11 +97,11 @@ An example declaration in SDL might be:
9797

9898
type Customer {
9999
name : String
100-
associatedMetaData : Json
100+
associatedMetaData : JSON
101101
}
102102

103103
type Query {
104-
customers(filterSyntax : Json) : [Customers]
104+
customers(filterSyntax : JSON) : [Customers]
105105
}
106106

107107
```
@@ -126,7 +126,7 @@ And example query might look like:
126126

127127
```
128128

129-
Note : The `Json` scalar is a simple alias type to the `Object` scalar because often the returned data is a blob of JSON. They are
129+
Note : The `JSON` scalar is a simple alias type to the `Object` scalar because often the returned data is a blob of JSON. They are
130130
all just objects at runtime in graphql-java terms and what network serialisation protocol is up to you. Choose whichever name you think
131131
adds more semantic readers to your schema consumers.
132132

0 commit comments

Comments
 (0)