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 5b822c2 commit 7a87a92Copy full SHA for 7a87a92
site/docs/APIReference-TypeSystem.md
@@ -203,15 +203,16 @@ var MyAppSchema = new GraphQLSchema({
203
### GraphQLScalarType
204
205
```js
206
-class GraphQLScalarType {
207
- constructor(config: GraphQLScalarTypeConfig)
+class GraphQLScalarType<InternalType> {
+ constructor(config: GraphQLScalarTypeConfig<InternalType>)
208
}
209
210
-type GraphQLScalarTypeConfig = {
+type GraphQLScalarTypeConfig<InternalType> = {
211
name: string;
212
description?: ?string;
213
- coerce: (value: any) => ?any;
214
- coerceLiteral: (value: Value) => ?any;
+ serialize: (value: mixed) => ?InternalType;
+ parseValue?: (value: mixed) => ?InternalType;
215
+ parseLiteral?: (valueAST: Value) => ?InternalType;
216
217
```
218
0 commit comments