@@ -74,19 +74,19 @@ And example query might look like:
74
74
75
75
```
76
76
77
- ## Object / Json Scalars
77
+ ## Object / JSON Scalars
78
78
79
79
* ` Object `
80
80
* An object scalar that accepts any object as a scalar value
81
81
82
- * ` Json `
82
+ * ` JSON `
83
83
* A synonym for the ` Object ` scalar, it will accept any object as a scalar value
84
84
85
85
One of the design goals of graphql, is that the type system describes the shape of the data returned.
86
86
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
88
88
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.
90
90
91
91
An example might be an extensible graphql system where systems can input custom metadata objects that cant be known at
92
92
schema type design time.
@@ -97,11 +97,11 @@ An example declaration in SDL might be:
97
97
98
98
type Customer {
99
99
name : String
100
- associatedMetaData : Json
100
+ associatedMetaData : JSON
101
101
}
102
102
103
103
type Query {
104
- customers (filterSyntax : Json ) : [Customers ]
104
+ customers (filterSyntax : JSON ) : [Customers ]
105
105
}
106
106
107
107
```
@@ -126,7 +126,7 @@ And example query might look like:
126
126
127
127
```
128
128
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
130
130
all just objects at runtime in graphql-java terms and what network serialisation protocol is up to you. Choose whichever name you think
131
131
adds more semantic readers to your schema consumers.
132
132
0 commit comments