Skip to content

Following FreeCodeCamp Tutorial: A Beginner’s Guide to GraphQL using graphpack

License

Notifications You must be signed in to change notification settings

CarleneCannon-Conner/simple-graphql-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-graphql-server

Following FreeCodeCamp Tutorial: A Beginner’s Guide to GraphQL using graphpack

To run locally:

npm run dev

Playground will be served at: http://localhost:4000/

drawing

Example Playground Queries

List all Users

query {
  users {
    id
    name
    email
    age
  }
}

Show a user by id

query {
  user(id: "1") {
    id
    name
    email
    age
  }
}

Example Playground Mutations

Create a new user

mutation {
  createUser(id: "3", name: "Robert", email: "[email protected]", age: 21) {
    id
    name
    email
    age
  }
}

Update an existing user

mutation {
  updateUser(id: "3", name: "Bobby", email: "[email protected]") {
    id
    name
    email
    age
  }
}

Delete an existing user

mutation {
  deleteUser(id: "3") {
    id
    name
    email
    age
  }
}

About

Following FreeCodeCamp Tutorial: A Beginner’s Guide to GraphQL using graphpack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published