Skip to content

Commit 4355c40

Browse files
committed
Documentation for main graphql() function
Improves #194
1 parent 39bf4a4 commit 4355c40

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/graphql.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,21 @@ import type { GraphQLSchema } from './type/schema';
2424
* More sophisticated GraphQL servers, such as those which persist queries,
2525
* may wish to separate the validation and execution phases to a static time
2626
* tooling step, and a server runtime step.
27+
*
28+
* schema:
29+
* The GraphQL type system to use when validating and executing a query.
30+
* requestString:
31+
* A GraphQL language formatted string representing the requested operation.
32+
* rootValue:
33+
* The value provided as the first argument to resolver functions on the top
34+
* level type (e.g. the query object type).
35+
* variableValues:
36+
* A mapping of variable name to runtime value to use for all variables
37+
* defined in the requestString.
38+
* operationName:
39+
* The name of the operation to use if requestString contains multiple
40+
* possible operations. Can be omitted if requestString contains only
41+
* one operation.
2742
*/
2843
export function graphql(
2944
schema: GraphQLSchema,

0 commit comments

Comments
 (0)