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 )
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
266236val 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