Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 8b6ffc6

Browse files
authored
Fixes and improvements to comments (#754)
1 parent 2061b09 commit 8b6ffc6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@ export type Options =
5252

5353
export interface OptionsData {
5454
/**
55-
* A GraphQL schema from graphql-js.
55+
* A GraphQL schema from `graphql-js`.
5656
*/
5757
schema: GraphQLSchema;
5858

5959
/**
60-
* A value to pass as the context to this middleware.
60+
* A value to pass as the `contextValue` to the `execute` function.
6161
*/
6262
context?: unknown;
6363

6464
/**
65-
* An object to pass as the rootValue to the graphql() function.
65+
* An object to pass as the `rootValue` to the `execute` function.
6666
*/
6767
rootValue?: unknown;
6868

@@ -73,7 +73,7 @@ export interface OptionsData {
7373

7474
/**
7575
* 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.
7777
*/
7878
validationRules?: ReadonlyArray<ValidationRule>;
7979

@@ -107,8 +107,8 @@ export interface OptionsData {
107107
customParseFn?: (source: Source) => DocumentNode;
108108

109109
/**
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.
112112
*/
113113
formatError?: (error: GraphQLError) => GraphQLFormattedError;
114114

@@ -172,7 +172,7 @@ export interface RequestInfo {
172172
result: FormattedExecutionResult;
173173

174174
/**
175-
* A value to pass as the context to the graphql() function.
175+
* The value passed as the `contextValue` to the `execute` function.
176176
*/
177177
context?: unknown;
178178
}
@@ -278,7 +278,7 @@ export function graphqlHTTP(options: Options): Middleware {
278278
try {
279279
documentAST = parseFn(new Source(query, 'GraphQL request'));
280280
} catch (syntaxError: unknown) {
281-
// Return 400: Bad Request if any syntax errors errors exist.
281+
// Return 400: Bad Request if any syntax errors exist.
282282
throw httpError(400, 'GraphQL syntax error.', {
283283
graphqlErrors: [syntaxError],
284284
});

0 commit comments

Comments
 (0)