graphql-http / handler / Request
handler.Request
Server agnostic request interface containing the raw request which is server dependant.
| Name |
|---|
Raw |
Context |
• Readonly body: null | string | Record<string, unknown> | () => null | string | Record<string, unknown> | Promise<null | string | Record<string, unknown>>
Parsed request body or a parser function.
If the provided function throws, the error message "Unparsable JSON body" will be in the erroneous response.
• Readonly context: Context
Context value about the incoming request, you're free to pass any information here.
• Readonly headers: RequestHeaders
• Readonly method: string
• Readonly raw: Raw
The raw request itself from the implementing server.
For example: express.Request when using Express, or maybe
http.IncomingMessage when just using Node with http.createServer.
• Readonly url: string