Skip to content

Commit

Permalink
add res to context docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Calder committed Nov 21, 2022
1 parent 6397a14 commit ca53771
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docs/pages/docs/context/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ import type { Context } from '.keystone/types';
context = {
// HTTP request object
req,
{% if $nextRelease %}
res,
{% /if %}

// Query API
query,

// Internal DB object API
db
db,

// GraphQL helpers
graphql: {
schema,
run,
raw,
};
},

// Session API
session,
Expand Down Expand Up @@ -62,8 +65,10 @@ context = {

### HTTP request object

`req`: The [IncomingMessage](https://nodejs.org/api/http.html#http_class_http_incomingmessage) object from the HTTP request which called the GraphQL API.

`req`: The [IncomingMessage](https://nodejs.org/api/http.html#class-httpincomingmessage) object from the HTTP request.
{% if $nextRelease %}
`res`: The [ServerResonse](https://nodejs.org/api/http.html#class-httpserverresponse) object for HTTP request.
{% /if %}
### Query API

`query`: The [Query API](./query), which can be used to perform CRUD operations against your GraphQL API and return a queried value.
Expand Down

0 comments on commit ca53771

Please sign in to comment.