Skip to content

Commit 8b71e35

Browse files
committed
Update Scalar doc to match api update
1 parent 7b8b961 commit 8b71e35

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

site/docs/APIReference-TypeSystem.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ class GraphQLScalarType {
210210
type GraphQLScalarTypeConfig = {
211211
name: string;
212212
description?: ?string;
213-
coerce: (value: any) => ?any;
214-
coerceLiteral: (value: Value) => ?any;
213+
serialize: (value: any) => ?any;
214+
parseLiteral: (value: Value) => ?any;
215215
}
216216
```
217217
@@ -224,7 +224,7 @@ functions used to ensure validity.
224224
```js
225225
var OddType = new GraphQLScalarType({
226226
name: 'Odd',
227-
coerce(value) {
227+
serialize(value) {
228228
return value % 2 === 1 ? value : null;
229229
}
230230
});

0 commit comments

Comments
 (0)