/graphql-notebook

Primary LanguageTypeScriptMIT LicenseMIT

GraphQL Notebook

Graphql CRUD example for learning

Stacks

Usage

Create Note

mutation{
  createNote(
    options: {
      title: "Title",
      content: "Note Content"
    }
  ) {
    id
    title
    content
    created_at
  }
}

Get All Notes

query{
  notes {
    id
    title
    content
    created_at
  }
}

Get Note By Id

query {
  note(id: 42) {
    id
    title
    content
    created_at
  }
}

Update Note

mutation{
	updateNote(
    id: 42
    options: {
      title: "Title"
      content: "New Project"
    }
  )
}

Delete Note

mutation {
  deleteNote(id: 42)
}

License

MIT 🥰🤑