Skip to content

Instantly share code, notes, and snippets.

@tabvn
Created August 4, 2019 02:47
Show Gist options
  • Select an option

  • Save tabvn/07feeca72408d9bcf3f406e882e0424e to your computer and use it in GitHub Desktop.

Select an option

Save tabvn/07feeca72408d9bcf3f406e882e0424e to your computer and use it in GitHub Desktop.
query timeLine {
timeline(filter: "everyone") {
id
timeline {
entityId
entityType
entity{
...on User{
id
avatar
username
}
... on Group{
id
name
avatar
}
}
}
feed {
__typename
... on GroupMember {
id
isBlocked
created
user {
id
username
isOnline
isVerified
}
}
... on Post {
id
body
created
author {
id
username
avatar
isVerified
}
files {
id
name
mimeType
url
}
}
}
}
}
query groupTimeline {
groupTimeline(groupId: 11) {
feed {
__typename
... on GroupMember {
id
isBlocked
created
user {
id
username
isOnline
isVerified
}
}
... on Post {
id
body
created
author {
id
username
avatar
isVerified
}
files {
id
name
mimeType
url
}
}
}
}
}
query groupMembers {
groupMembers(id: 1) {
id
user {
id
username
isOnline
}
created
role
}
}
mutation createRoom {
createRoom(name: "test room", avatar: "", users: [2]) {
id
name
avatar
members {
id
user {
id
firstName
lastName
}
status
}
}
}
mutation followUser {
followUser(userId: 5, action: true)
}
query post {
post(id: 53) {
id
body
postType
created
updated
pinned
commentCount
author {
id
username
avatar
isOnline
isVerified
}
files {
id
name
mimeType
url
}
}
}
subscription notification {
notification {
__typename
... on NotificationPostHasComment {
id
isRead
created
post {
id
}
comment {
id
body
}
fromUser {
id
username
isOnline
}
comment {
id
body
}
}
... on NotificationPostHasReaction {
id
isRead
created
reaction {
id
option
}
post {
id
body
}
fromUser {
id
username
}
}
... on NotificationCommentHasReaction {
id
isRead
created
post {
id
}
comment {
id
body
}
reaction {
id
option
}
fromUser {
id
username
}
}
... on NotificationUserFollow {
id
isRead
fromUser {
id
username
}
}
}
}
mutation markAllNotificationsAsRead {
markAllNotificationsAsRead
}
query notificationBadge {
notificationBadge
}
query notifications {
notifications(limit: null, offset: null) {
__typename
... on NotificationPostHasComment {
id
isRead
created
post {
id
}
comment {
id
body
}
fromUser {
id
username
isOnline
}
comment {
id
body
}
}
... on NotificationPostHasReaction {
id
isRead
created
reaction {
id
option
}
post {
id
body
}
fromUser {
id
username
}
}
... on NotificationCommentHasReaction {
id
isRead
created
post {
id
}
comment {
id
body
}
reaction {
id
option
}
fromUser {
id
username
}
}
}
}
mutation favoritePost {
favoritePost(postId: 55, action: false)
}
query userIsFavoritePost {
isFavorite: userIsFavoritePost(postId: 55)
}
mutation deletePost {
deletePost(id: 1)
}
query reaction {
likeCount: postReactionCount(postId: 31, option: "like")
}
mutation createPostReaction {
createPostReaction(postId: 31, option: "dislike", action: true) {
id
option
author {
id
username
avatar
}
}
}
query postReationCount {
postReactionCount(postId: 31, option: "dislike")
}
query userIsReactPost {
userIsReactPost(postId: 31) {
id
option
created
author {
id
username
avatar
}
}
}
query postComments {
postComments(postId: 1) {
id
body
created
updated
author {
id
username
avatar
isOnline
}
}
}
mutation createPostComment {
createPostComment(postId: 31, body: "Another comment") {
id
body
created
updated
author {
id
username
avatar
isOnline
}
}
}
query timeline {
timeline(filter: "everyone", limit: 10, offset: 0) {
id
timeline {
id
entityType
entityId
}
feed {
... on Post {
id
body
postType
created
updated
pinned
author {
id
username
avatar
}
files {
id
name
url
mimeType
}
}
}
}
}
mutation createPost {
createPost(postType: null, body: "New post") {
id
body
created
pinned
author {
id
username
avatar
}
}
}
subscription messageCreated {
messageCreated {
id
}
}
subscription roomMessageCreated {
roomMessageCreated(id: 18) {
id
body
author {
id
username
avatar
}
created
}
}
query room {
room(id: 18) {
id
name
avatar
members {
id
user {
id
username
avatar
isOnline
}
}
}
}
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, limit: 50, offset: 0, search: "") {
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: 1)
}
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: "") {
id
firstName
lastName
username
avatar
coverImage
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"
username: "tabvn"
}
) {
id
firstName
lastName
}
}
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