Skip to content

Fix graphqlHTTP imports #933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking β€œSign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions site/graphql-js/APIReference-ExpressGraphQL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ next: /graphql-js/graphql/
The `express-graphql` module provides a simple way to create an [Express](https://expressjs.com/) server that runs a GraphQL API.

```js
import graphqlHTTP from 'express-graphql'; // ES6
var graphqlHTTP = require('express-graphql'); // CommonJS
import { graphqlHTTP } from 'express-graphql'; // ES6
var { graphqlHTTP } = require('express-graphql'); // CommonJS
```

### graphqlHTTP
Expand Down
4 changes: 2 additions & 2 deletions site/graphql-js/Guides-ConstructingTypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ For example, let's say we are building a simple API that lets you fetch user dat

```javascript
var express = require('express');
var graphqlHTTP = require('express-graphql');
var { graphqlHTTP } = require('express-graphql');
var { buildSchema } = require('graphql');

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

```javascript
var express = require('express');
var graphqlHTTP = require('express-graphql');
var { graphqlHTTP } = require('express-graphql');
var graphql = require('graphql');

// Maps id to User object
Expand Down
2 changes: 1 addition & 1 deletion site/graphql-js/Tutorial-PassingArguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The entire code for a server that hosts this `rollDice` API is:

```javascript
var express = require('express');
var graphqlHTTP = require('express-graphql');
var { graphqlHTTP } = require('express-graphql');
var { buildSchema } = require('graphql');

// Construct a schema, using GraphQL schema language
Expand Down