You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/pages/authentication-and-express-middleware.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,11 @@ To use middleware with a GraphQL resolver, just use the middleware like you woul
10
10
For example, let's say we wanted our server to log the IP address of every request, and we also want to write an API that returns the IP address of the caller. We can do the former with middleware, and the latter by accessing the `request` object in a resolver. Here's server code that implements this:
11
11
12
12
```js
13
-
var express =require('express');
14
-
var { createHandler } =require('graphql-http/lib/use/express');
Copy file name to clipboardExpand all lines: website/pages/basic-types.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,12 +13,12 @@ To use a list type, surround the type in square brackets, so `[Int]` is a list o
13
13
Each of these types maps straightforwardly to JavaScript, so you can just return plain old JavaScript objects in APIs that return these types. Here's an example that shows how to use some of these basic types:
14
14
15
15
```js
16
-
var express =require('express');
17
-
var { createHandler } =require('graphql-http/lib/use/express');
Copy file name to clipboardExpand all lines: website/pages/constructing-types.mdx
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,11 @@ When you are using the `GraphQLSchema` constructor to create a schema, instead o
9
9
For example, let's say we are building a simple API that lets you fetch user data for a few hardcoded users based on an id. Using `buildSchema` we could write a server with:
10
10
11
11
```js
12
-
var express =require('express');
13
-
var { createHandler } =require('graphql-http/lib/use/express');
Copy file name to clipboardExpand all lines: website/pages/going-to-production.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Enabling Defer & Stream
2
+
title: Going to Production
3
3
---
4
4
5
5
The `@defer` and `@stream` directives are not enabled by default. In order to use these directives, you must add them to your GraphQL Schema and use the `experimentalExecuteIncrementally` function instead of `execute`.
0 commit comments