Skip to content

docs: Changed how to import graphqlHTTP in graphql-express modules#2693

Merged
IvanGoncharov merged 3 commits intographql:masterfrom
solidw:fix-express-graphql-tutorial-docs
Jul 7, 2020
Merged

docs: Changed how to import graphqlHTTP in graphql-express modules#2693
IvanGoncharov merged 3 commits intographql:masterfrom
solidw:fix-express-graphql-tutorial-docs

Conversation

@solidw
Copy link
Copy Markdown
Contributor

@solidw solidw commented Jul 7, 2020

overview

I just followed the document at graphql-js tutorials.

But there is problem when I import graphqlHTTP from 'express-grapqhl'.
image
(The squared black blank is my user name.)

Because they updated express-grapqhl modules and updated official README.md 27 days ago. express-graphql history (see below image)
image

So I changed require statement in graphql-js tutorials.
var graphqlHTTP = require('express-graphql')
to
var { graphqlHTTP } = require('express-graphql')

And it works!
image

@danielrearden
Copy link
Copy Markdown
Contributor

@solidw Thanks for submitting this PR!

@IvanGoncharov IvanGoncharov merged commit 0e88044 into graphql:master Jul 7, 2020
@solidw solidw deleted the fix-express-graphql-tutorial-docs branch July 23, 2020 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants