Skip to content

Instantly share code, notes, and snippets.

@tabvn
Created July 19, 2019 10:14
Show Gist options
  • Select an option

  • Save tabvn/098db7d5d571a06879c9db3b70dcbb9d to your computer and use it in GitHub Desktop.

Select an option

Save tabvn/098db7d5d571a06879c9db3b70dcbb9d to your computer and use it in GitHub Desktop.
mutation createMessage{
createMessage(roomId:18, body:"Hi there how are you?", messageType: "default"){
id
body
messageType
author{
id
username
avatar
isOnline
}
}
}
query messages{
messages(roomId:17){
id
body
messageType
created
updated
author{
id
username
avatar
isOnline
}
}
}
query rooms {
rooms(search:"",limit: 20, offset: 0) {
id
name
avatar
created
lastMessage{
id
body
}
members {
id
user {
id
username
}
}
}
}
subscription userChangeOnlineStatus{
userChangeOnlineStatus(userId: 2)
}
subscription friendCreated{
friendCreated{
id
user{
id
username
avatar
}
friend{
id
username
avatar
}
}
}
subscription friendRequestCreated{
friendRequestCreated{
id
friend{
id
username
firstName
lastName
}
user{
id
username
firstName
lastName
}
}
}
query findFriends{
findFriends(search: "", limit:null, offset: null){
id
firstName
username
avatar
isOnline
lastOnline
}
}
mutation answerFriendRequest{
answerRequestFriend(id: 9, accepted:true)
}
mutation addFriend{
addFriend(userId:2)
}
query friends{
friends(search: "", limit: null, offset: null){
id
user{
id
firstName
lastName
username
isOnline
lastOnline
}
friend{
id
firstName
lastName
username
isOnline
lastOnline
}
room{
id
}
created
}
}
query friendRequests{
friendRequests(limit: null, offset:null){
id
user{
id
avatar
firstName
lastName
username
}
created
}
}
query forumTopic{
forumTopic(id:1){
id
body
created
commentCount
author{
id
username
}
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
avatar
}
created
updated
}
}
mutation createForumComment{
createForumComment(topicId: 1, body: "The comment"){
id
body
author{
id
firstName
lastName
}
topic{
id
title
}
}
}
query forumTopics{
forumTopics(categoryId: 9, search: "", limit:10, offset: 0){
id
title
body
created
commentCount
category{
id
title
}
}
}
mutation deleteForumTopic{
deleteForumTopic(id:4)
}
mutation updateForumTopic{
updateForumTopic(id:1, title: "The new topic", body: "the new topic lorem")
}
mutation createForumTopic{
createForumTopic(categoryId:9, title: "The new topic 1", 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
updated
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
}
}
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: "jimmy") {
id
firstName
lastName
username
email
created
updated
roles
}
}
mutation register {
register(
firstName: "Simon"
lastName: "Vu"
username:"simon"
email: "simom@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", avatar: "", users: [2]) {
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