Skip to content

OkuraSt/items_graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solution to Tutorial: How to build a GraphQL server

git clone [email protected]:apollostack/apollo-starter-kit.git
cd apollo-starter-kit
git checkout server-tutorial-solution
npm install
npm run start

And in another terminal:

mongod

Then open http://localhost:8080

When you paste this on the left:

{
  author(firstName:"Edmond", lastName: "Jones"){
    firstName
    lastName
    posts{
      title
      views
    }
  }
  getFortuneCookie
}

and hit the play button (cmd-return), then you should get something like this on the right:

{
  "data": {
    "author": {
      "firstName": "Edmond",
      "lastName": "Jones",
      "posts": [
        {
          "title": "A post by Edmond",
          "views": 92
        }
      ]
    },
    "getFortuneCookie": "A good conscience is a soft pillow."
  }
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •