Skip to content

Template graphql project with mongodb integration

Notifications You must be signed in to change notification settings

suphero/graphql-101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphql-101

Install and open app in development mode

with npm

npm i
npm run dev

or with yarn

yarn
yarn dev

Demo app

https://graph-101.herokuapp.com/

Sample Queries

Get Posts

{
  posts {
    _id
    title
    content
    comments {
      _id
      postId
      content
    }
  }
}

Get Post

{
  post(_id: "5bed274c014e45d7a93046c0") {
    _id
    title
    content
    comments {
      _id
      postId
      content
    }
  }
}

Get Comment

{
  comment(_id: "5bed282760666dd83f7f017c") {
    _id
    postId
    content
    post {
      _id
      title
      content
    }
  }
}

Create Post

mutation {
  createPost(title: "hello", content: "world") {
    _id
    title
    content
    comments {
      content
    }
  }
}

Create Comment

mutation {
  createComment(postId: "5bed2a4f564b4fd99fa8041d", content: "hello") {
    _id
    content
    postId
  }
}

Slide

https://docs.google.com/presentation/d/1dmreDWqJG4NTGQf2LCWIXtIC2f0BFK6lJ_1qQBcgGXE

Postman

https://www.getpostman.com/collections/a713446844651b5e7e11

About

Template graphql project with mongodb integration

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published