@@ -52,17 +52,17 @@ export type Options =
52
52
53
53
export interface OptionsData {
54
54
/**
55
- * A GraphQL schema from graphql-js.
55
+ * A GraphQL schema from ` graphql-js` .
56
56
*/
57
57
schema : GraphQLSchema ;
58
58
59
59
/**
60
- * A value to pass as the context to this middleware .
60
+ * A value to pass as the `contextValue` to the `execute` function .
61
61
*/
62
62
context ?: unknown ;
63
63
64
64
/**
65
- * An object to pass as the rootValue to the graphql() function.
65
+ * An object to pass as the ` rootValue` to the `execute` function.
66
66
*/
67
67
rootValue ?: unknown ;
68
68
@@ -73,7 +73,7 @@ export interface OptionsData {
73
73
74
74
/**
75
75
* An optional array of validation rules that will be applied on the document
76
- * in additional to those defined by the GraphQL spec.
76
+ * in addition to those defined by the GraphQL spec.
77
77
*/
78
78
validationRules ?: ReadonlyArray < ValidationRule > ;
79
79
@@ -107,8 +107,8 @@ export interface OptionsData {
107
107
customParseFn ?: ( source : Source ) => DocumentNode ;
108
108
109
109
/**
110
- * `formatError` is deprecated and replaced by `customFormatErrorFn`. It will
111
- * be removed in version 1.0.0.
110
+ * @deprecated `formatError` is deprecated and replaced by `customFormatErrorFn`.
111
+ * It will be removed in version 1.0.0.
112
112
*/
113
113
formatError ?: ( error : GraphQLError ) => GraphQLFormattedError ;
114
114
@@ -172,7 +172,7 @@ export interface RequestInfo {
172
172
result : FormattedExecutionResult ;
173
173
174
174
/**
175
- * A value to pass as the context to the graphql() function.
175
+ * The value passed as the `contextValue` to the `execute` function.
176
176
*/
177
177
context ?: unknown ;
178
178
}
@@ -278,7 +278,7 @@ export function graphqlHTTP(options: Options): Middleware {
278
278
try {
279
279
documentAST = parseFn ( new Source ( query , 'GraphQL request' ) ) ;
280
280
} catch ( syntaxError : unknown ) {
281
- // Return 400: Bad Request if any syntax errors errors exist.
281
+ // Return 400: Bad Request if any syntax errors exist.
282
282
throw httpError ( 400 , 'GraphQL syntax error.' , {
283
283
graphqlErrors : [ syntaxError ] ,
284
284
} ) ;
0 commit comments