Skip to content

Commit 71b7bd2

Browse files
committed
Fix graphqlHTTP imports
1 parent a9312f7 commit 71b7bd2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

site/graphql-js/APIReference-ExpressGraphQL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ next: /graphql-js/graphql/
1010
The `express-graphql` module provides a simple way to create an [Express](https://expressjs.com/) server that runs a GraphQL API.
1111

1212
```js
13-
import graphqlHTTP from 'express-graphql'; // ES6
14-
var graphqlHTTP = require('express-graphql'); // CommonJS
13+
import { graphqlHTTP } from 'express-graphql'; // ES6
14+
var { graphqlHTTP } = require('express-graphql'); // CommonJS
1515
```
1616

1717
### graphqlHTTP

site/graphql-js/Guides-ConstructingTypes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ For example, let's say we are building a simple API that lets you fetch user dat
1414

1515
```javascript
1616
var express = require('express');
17-
var graphqlHTTP = require('express-graphql');
17+
var { graphqlHTTP } = require('express-graphql');
1818
var { buildSchema } = require('graphql');
1919

2020
var schema = buildSchema(`
@@ -60,7 +60,7 @@ We can implement this same API without using GraphQL schema language:
6060

6161
```javascript
6262
var express = require('express');
63-
var graphqlHTTP = require('express-graphql');
63+
var { graphqlHTTP } = require('express-graphql');
6464
var graphql = require('graphql');
6565

6666
// Maps id to User object

site/graphql-js/Tutorial-PassingArguments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The entire code for a server that hosts this `rollDice` API is:
5858

5959
```javascript
6060
var express = require('express');
61-
var graphqlHTTP = require('express-graphql');
61+
var { graphqlHTTP } = require('express-graphql');
6262
var { buildSchema } = require('graphql');
6363

6464
// Construct a schema, using GraphQL schema language

0 commit comments

Comments
 (0)