Skip to content

Commit b87a4ef

Browse files
committed
gendocs
1 parent cb9dd8b commit b87a4ef

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

docs/modules/handler.md

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
### Type Aliases
1414

15-
- [AcceptableMediaType](handler.md#acceptablemediatype)
1615
- [FormatError](handler.md#formaterror)
1716
- [Handler](handler.md#handler)
1817
- [OperationArgs](handler.md#operationargs)
@@ -25,20 +24,10 @@
2524
### Functions
2625

2726
- [createHandler](handler.md#createhandler)
28-
- [getAcceptableMediaType](handler.md#getacceptablemediatype)
2927
- [isResponse](handler.md#isresponse)
30-
- [makeResponse](handler.md#makeresponse)
3128

3229
## Server
3330

34-
### AcceptableMediaType
35-
36-
Ƭ **AcceptableMediaType**: ``"application/graphql-response+json"`` \| ``"application/json"``
37-
38-
Request's Media-Type that the server accepts.
39-
40-
___
41-
4231
### FormatError
4332

4433
Ƭ **FormatError**: (`err`: `Readonly`<`GraphQLError` \| `Error`\>) => `GraphQLError` \| `Error`
@@ -230,25 +219,6 @@ console.log('Listening to port 4000');
230219

231220
___
232221

233-
### getAcceptableMediaType
234-
235-
**getAcceptableMediaType**(`acceptHeader`): [`AcceptableMediaType`](handler.md#acceptablemediatype) \| ``null``
236-
237-
Inspects the request and detects the appropriate/acceptable Media-Type
238-
looking at the `Accept` header while complying with the GraphQL over HTTP spec.
239-
240-
#### Parameters
241-
242-
| Name | Type |
243-
| :------ | :------ |
244-
| `acceptHeader` | `undefined` \| ``null`` \| `string` |
245-
246-
#### Returns
247-
248-
[`AcceptableMediaType`](handler.md#acceptablemediatype) \| ``null``
249-
250-
___
251-
252222
### isResponse
253223

254224
**isResponse**(`val`): val is Response
@@ -264,31 +234,3 @@ Checks whether the passed value is the `graphql-http` server agnostic response.
264234
#### Returns
265235

266236
val is Response
267-
268-
___
269-
270-
### makeResponse
271-
272-
**makeResponse**(`resultOrErrors`, `acceptedMediaType`, `formatError`): [`Response`](handler.md#response)
273-
274-
Creates an appropriate GraphQL over HTTP response following the provided arguments.
275-
276-
If the first argument is an `ExecutionResult`, the operation will be treated as "successful".
277-
278-
If the first argument is (an array of) `GraphQLError`, or an `ExecutionResult` without the `data` field, it will be treated
279-
the response will be constructed with the help of `acceptedMediaType` complying with the GraphQL over HTTP spec.
280-
281-
If the first argument is an `Error`, the operation will be treated as a bad request responding with `400: Bad Request` and the
282-
error will be present in the `ExecutionResult` style.
283-
284-
#### Parameters
285-
286-
| Name | Type |
287-
| :------ | :------ |
288-
| `resultOrErrors` | readonly `GraphQLError`[] \| `Readonly`<`ExecutionResult`<`ObjMap`<`unknown`\>, `ObjMap`<`unknown`\>\>\> \| `Readonly`<`GraphQLError`\> \| `Readonly`<`Error`\> |
289-
| `acceptedMediaType` | [`AcceptableMediaType`](handler.md#acceptablemediatype) |
290-
| `formatError` | [`FormatError`](handler.md#formaterror) |
291-
292-
#### Returns
293-
294-
[`Response`](handler.md#response)

0 commit comments

Comments
 (0)