We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b8b961 commit 8b71e35Copy full SHA for 8b71e35
site/docs/APIReference-TypeSystem.md
@@ -210,8 +210,8 @@ class GraphQLScalarType {
210
type GraphQLScalarTypeConfig = {
211
name: string;
212
description?: ?string;
213
- coerce: (value: any) => ?any;
214
- coerceLiteral: (value: Value) => ?any;
+ serialize: (value: any) => ?any;
+ parseLiteral: (value: Value) => ?any;
215
}
216
```
217
@@ -224,7 +224,7 @@ functions used to ensure validity.
224
```js
225
var OddType = new GraphQLScalarType({
226
name: 'Odd',
227
- coerce(value) {
+ serialize(value) {
228
return value % 2 === 1 ? value : null;
229
230
});
0 commit comments