Created
July 11, 2019 11:01
-
-
Save tabvn/dc8e182e50c0b5c1517462aa67ed8599 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Write your query or mutation here | |
query me { | |
me { | |
id | |
firstName | |
lastName | |
created | |
updated | |
roles | |
} | |
} | |
query rooms{ | |
rooms(limit:10, offset: 0){ | |
id | |
name | |
avatar | |
updated | |
created | |
members{ | |
id | |
status | |
created | |
userId | |
user{ | |
id | |
firstName | |
lastName | |
} | |
} | |
author{ | |
id | |
firstName | |
lastName | |
} | |
} | |
} | |
mutation login{ | |
login(email: "[email protected]", password: "admin"){ | |
token | |
expired | |
user{ | |
id | |
firstName | |
lastName | |
created | |
updated | |
} | |
} | |
} | |
query users{ | |
users(limit:10, offset: 0, search: ""){ | |
id | |
firstName | |
lastName | |
created | |
updated | |
roles | |
} | |
} | |
mutation register { | |
register( | |
firstName: "Cong" | |
lastName: "Nguyen" | |
email: "[email protected]" | |
password: "admin" | |
){ | |
id | |
firstName | |
lastName | |
created | |
updated | |
} | |
} | |
mutation updateUser{ | |
updateUser(id:1, input: {firstName: "Toan", lastName:"Nguyen Dinh 1", email: "[email protected]"}){ | |
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 | |
created | |
updated | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment