Skip to content

graphqlHTTP #106

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

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion site/code/index.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ npm install express express-graphql graphql

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

var schema = buildSchema(\`
Expand Down
2 changes: 1 addition & 1 deletion site/graphql-js/APIReference-ExpressGraphQL.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ next: /graphql-js/graphql/

```js
import graphqlHTTP from 'express-graphql'; // ES6
var graphqlHTTP = require('express-graphql'); // CommonJS
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 @@ next: /graphql-js/express-graphql/

```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 @@ console.log('Running a GraphQL API server at localhost:4000/graphql');

```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-Authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Express 中间件可以很方便地结合 `express-graphql` 使用,这也是

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

var schema = buildSchema(`
Expand Down
2 changes: 1 addition & 1 deletion site/graphql-js/Tutorial-BasicTypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GraphQL schema language 支持的标量类型有 `String`、`Int`、`Float`、`B

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

// 使用 GraphQL schema language 构建一个 schema
Expand Down
2 changes: 1 addition & 1 deletion site/graphql-js/Tutorial-ExpressGraphQL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ npm install express express-graphql graphql --save

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

// 使用 GraphQL Schema Language 创建一个 schema
Expand Down
2 changes: 1 addition & 1 deletion site/graphql-js/Tutorial-Mutations.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type Mutation {

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

// 使用 GraphQL schema language 构建 schema
Expand Down
2 changes: 1 addition & 1 deletion site/graphql-js/Tutorial-ObjectTypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ type Query {

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

// 用 GraphQL schema language 构造一个 schema
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 @@ var root = {

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

// 使用 GraphQL schema language 构造一个 schema
Expand Down