mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
* refactor: externalize all remaining queries in spec files * User with different queries due to permissions * fix notification:groups * fix hashtagsmiddleware * fix blockedUsers * fix softDeleteMiddleware * fix shouts.spec * fix userInteractions spec * fix mutedUsers spec * seocialMedia spec * fix notificationMiddleware.spec * fix user.spce & fix undefined activeCategories * fix notifications.spec * fix userInteractions.spec * fix blockedUsers & mutedUsers spec * remove unused comment * fix locations spec * fix orderByMiddleware & spec * fix lint * fix shout spec
166 lines
2.7 KiB
TypeScript
166 lines
2.7 KiB
TypeScript
import gql from 'graphql-tag'
|
|
|
|
export const User = gql`
|
|
query ($id: ID, $name: String, $email: String) {
|
|
User(id: $id, name: $name, email: $email) {
|
|
id
|
|
name
|
|
badgeTrophiesCount
|
|
badgeTrophies {
|
|
id
|
|
}
|
|
badgeVerification {
|
|
id
|
|
isDefault
|
|
}
|
|
badgeTrophiesSelected {
|
|
id
|
|
isDefault
|
|
}
|
|
followedBy {
|
|
id
|
|
}
|
|
followedByCurrentUser
|
|
following {
|
|
name
|
|
slug
|
|
about
|
|
avatar {
|
|
url
|
|
}
|
|
comments {
|
|
content
|
|
contentExcerpt
|
|
}
|
|
contributions {
|
|
title
|
|
slug
|
|
image {
|
|
url
|
|
}
|
|
content
|
|
contentExcerpt
|
|
}
|
|
}
|
|
isMuted
|
|
isBlocked
|
|
location {
|
|
distanceToMe
|
|
}
|
|
activeCategories
|
|
}
|
|
}
|
|
`
|
|
|
|
export const UserEmailNotificationSettings = gql`
|
|
query ($id: ID, $name: String, $email: String) {
|
|
User(id: $id, name: $name, email: $email) {
|
|
id
|
|
name
|
|
badgeTrophiesCount
|
|
badgeTrophies {
|
|
id
|
|
}
|
|
badgeVerification {
|
|
id
|
|
isDefault
|
|
}
|
|
badgeTrophiesSelected {
|
|
id
|
|
isDefault
|
|
}
|
|
followedBy {
|
|
id
|
|
}
|
|
followedByCurrentUser
|
|
following {
|
|
name
|
|
slug
|
|
about
|
|
avatar {
|
|
url
|
|
}
|
|
comments {
|
|
content
|
|
contentExcerpt
|
|
}
|
|
contributions {
|
|
title
|
|
slug
|
|
image {
|
|
url
|
|
}
|
|
content
|
|
contentExcerpt
|
|
}
|
|
}
|
|
isMuted
|
|
isBlocked
|
|
location {
|
|
distanceToMe
|
|
}
|
|
emailNotificationSettings {
|
|
type
|
|
settings {
|
|
name
|
|
value
|
|
}
|
|
}
|
|
activeCategories
|
|
}
|
|
}
|
|
`
|
|
|
|
export const UserEmail = gql`
|
|
query ($id: ID, $name: String, $email: String) {
|
|
User(id: $id, name: $name, email: $email) {
|
|
id
|
|
name
|
|
email
|
|
badgeTrophiesCount
|
|
badgeTrophies {
|
|
id
|
|
}
|
|
badgeVerification {
|
|
id
|
|
isDefault
|
|
}
|
|
badgeTrophiesSelected {
|
|
id
|
|
isDefault
|
|
}
|
|
followedBy {
|
|
id
|
|
}
|
|
followedByCurrentUser
|
|
following {
|
|
name
|
|
slug
|
|
about
|
|
avatar {
|
|
url
|
|
}
|
|
comments {
|
|
content
|
|
contentExcerpt
|
|
}
|
|
contributions {
|
|
title
|
|
slug
|
|
image {
|
|
url
|
|
}
|
|
content
|
|
contentExcerpt
|
|
}
|
|
}
|
|
isMuted
|
|
isBlocked
|
|
location {
|
|
distanceToMe
|
|
}
|
|
activeCategories
|
|
}
|
|
}
|
|
`
|