Skip to content

Commit 7a87a92

Browse files
committed
Update Scalar Config to reflect graphql-js#116
1 parent 5b822c2 commit 7a87a92

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

site/docs/APIReference-TypeSystem.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,16 @@ var MyAppSchema = new GraphQLSchema({
203203
### GraphQLScalarType
204204
205205
```js
206-
class GraphQLScalarType {
207-
constructor(config: GraphQLScalarTypeConfig)
206+
class GraphQLScalarType<InternalType> {
207+
constructor(config: GraphQLScalarTypeConfig<InternalType>)
208208
}
209209

210-
type GraphQLScalarTypeConfig = {
210+
type GraphQLScalarTypeConfig<InternalType> = {
211211
name: string;
212212
description?: ?string;
213-
coerce: (value: any) => ?any;
214-
coerceLiteral: (value: Value) => ?any;
213+
serialize: (value: mixed) => ?InternalType;
214+
parseValue?: (value: mixed) => ?InternalType;
215+
parseLiteral?: (valueAST: Value) => ?InternalType;
215216
}
216217
```
217218

0 commit comments

Comments
 (0)