Skip to content

Instantly share code, notes, and snippets.

@tabvn
Last active July 14, 2019 10:11
Show Gist options
  • Select an option

  • Save tabvn/965be82807b0300d69cb9b0b140496ad to your computer and use it in GitHub Desktop.

Select an option

Save tabvn/965be82807b0300d69cb9b0b140496ad to your computer and use it in GitHub Desktop.
query forumTopic{
forumTopic(id:1){
id
body
author{
id
username
firstName
lastName
}
category{
id
title
}
}
}
mutation deleteForumComment{
deleteForumComment(id:2)
}
mutation updateForumComment{
updateForumComment(id:1, body: "The comment has been updated")
}
query forumComments{
forumComments(topicId:1, search: "", limit:10, offset: 0){
id
body
author{
id
username
firstName
lastName
}
topic{
id
title
}
created
updated
}
}
mutation createForumComment{
createForumComment(topicId: 1, body: "The comment"){
id
body
author{
id
firstName
lastName
}
topic{
id
title
}
}
}
query forumTopics{
forumTopics(categoryId: 10, search: "", limit:10, offset: 0){
id
title
body
created
commentCount
author{
id
firstName
lastName
}
category{
id
title
body
parent{
id
title
body
}
children{
id
title
body
}
}
}
}
mutation deleteForumTopic{
deleteForumTopic(id:4)
}
mutation updateForumTopic{
updateForumTopic(id:1, title: "The new topic", body: "the new topic lorem")
}
mutation createForumTopic{
createForumTopic(categoryId:10, title: "The new topic", body: "The new topic lorem"){
id
title
body
author{
id
firstName
lastName
}
category{
id
title
body
}
created
}
}
mutation deleteForumCategory{
deleteForumCategory(id: 10)
}
mutation updateForumCategory{
updateForumCategory(id: 11, title: "Counter-Strike 1", body: "", parentId:10){
id
title
body
created
updated
parent{
id
title
}
children{
id
title
}
}
}
query forumCategory{
forumCategory(id: 3){
id
title
body
topicCount
children{
id
title
body
created
children{
id
title
body
created
}
}
parent{
id
title
body
created
}
}
}
query forumsCategories{
forumCategories{
id
title
body
created
topicCount
children{
id
title
body
created
children{
id
title
body
created
}
}
}
}
mutation createForumCategory{
createForumCategory(title:"Country-strike", body: "", parentId: 10){
id
title
body
created
parent{
id
title
body
}
}
}
query me {
me {
id
username
firstName
lastName
email
created
updated
roles
}
}
query rooms {
rooms(limit: 10, offset: 0) {
id
name
avatar
updated
created
members {
id
status
created
user {
id
firstName
lastName
}
}
author {
id
firstName
lastName
}
}
}
mutation login {
login(email: "toan@tabvn.com", password: "admin") {
token
expired
user {
id
firstName
lastName
email
created
updated
roles
}
}
}
query users {
users(limit: 10, offset: 0, search: "") {
id
firstName
lastName
username
email
created
updated
roles
}
}
mutation register {
register(
firstName: "Tom"
lastName: "Nguyen"
username:"tabvn"
email: "tom@tabvn.com"
password: "admin"
) {
id
firstName
username
lastName
email
created
updated
}
}
mutation updateUser {
updateUser(
id: 1
input: {
firstName: "Toan"
lastName: "Nguyen Dinh 1"
email: "toan@tabvn.com"
}
) {
id
firstName
lastName
}
}
mutation createRoom {
createRoom(name: "test room 3", avatar: "", users: [1]) {
id
name
avatar
members {
id
user {
id
firstName
lastName
}
status
}
}
}
subscription userCreated {
userCreated {
id
firstName
lastName
email
created
updated
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment