Skip to content

Commit 72a3a14

Browse files
committed
change docs
1 parent c0fd8c9 commit 72a3a14

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

Diff for: docs/interfaces/audits_common.AuditFail.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ ___
5252

5353
### status
5454

55-
**status**: ``"warn"`` \| ``"error"``
55+
**status**: ``"notice"`` \| ``"warn"`` \| ``"error"``

Diff for: docs/modules/handler.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,17 @@ Creates an appropriate GraphQL over HTTP response following the provided argumen
252252

253253
If the first argument is an `ExecutionResult`, the operation will be treated as "successful".
254254

255-
If the first argument is _any_ object without the `data` field, it will be treated as an error (as per the spec)
256-
and the response will be constructed with the help of `acceptedMediaType` complying with the GraphQL over HTTP spec.
255+
If the first argument is (an array of) `GraphQLError`, or an `ExecutionResult` without the `data` field, it will be treated
256+
the response will be constructed with the help of `acceptedMediaType` complying with the GraphQL over HTTP spec.
257+
258+
If the first argument is an `Error`, the operation will be treated as a bad request responding with `400: Bad Request` and the
259+
error will be present in the `ExecutionResult` style.
257260

258261
#### Parameters
259262

260263
| Name | Type |
261264
| :------ | :------ |
262-
| `resultOrErrors` | readonly `GraphQLError`[] \| `Readonly`<`ExecutionResult`<`ObjMap`<`unknown`\>, `ObjMap`<`unknown`\>\>\> \| `Readonly`<`GraphQLError`\> |
265+
| `resultOrErrors` | readonly `GraphQLError`[] \| `Readonly`<`ExecutionResult`<`ObjMap`<`unknown`\>, `ObjMap`<`unknown`\>\>\> \| `Readonly`<`GraphQLError`\> \| `Readonly`<`Error`\> |
263266
| `acceptedMediaType` | [`AcceptableMediaType`](handler.md#acceptablemediatype) |
264267

265268
#### Returns

Diff for: src/handler.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,11 @@ export function getAcceptableMediaType(
704704
*
705705
* If the first argument is an `ExecutionResult`, the operation will be treated as "successful".
706706
*
707-
* If the first argument is _any_ object without the `data` field, it will be treated as an error (as per the spec)
708-
* and the response will be constructed with the help of `acceptedMediaType` complying with the GraphQL over HTTP spec.
707+
* If the first argument is (an array of) `GraphQLError`, or an `ExecutionResult` without the `data` field, it will be treated
708+
* the response will be constructed with the help of `acceptedMediaType` complying with the GraphQL over HTTP spec.
709+
*
710+
* If the first argument is an `Error`, the operation will be treated as a bad request responding with `400: Bad Request` and the
711+
* error will be present in the `ExecutionResult` style.
709712
*
710713
* @category Server
711714
*/

0 commit comments

Comments
 (0)