Moving queries into dedicated files (#1210)

* Moving queries into dedicated files

* fix ci
This commit is contained in:
Weiko
2023-08-14 19:31:20 -07:00
committed by GitHub
parent 656f1af15c
commit 24e5132029
149 changed files with 2908 additions and 3094 deletions

View File

@ -0,0 +1,9 @@
import { gql } from '@apollo/client';
export const DELETE_USER_ACCOUNT = gql`
mutation DeleteUserAccount {
deleteUserAccount {
id
}
}
`;

View File

@ -0,0 +1,10 @@
import { gql } from '@apollo/client';
export const REMOVE_PROFILE_PICTURE = gql`
mutation RemoveProfilePicture($where: UserWhereUniqueInput!) {
updateUser(data: { avatarUrl: null }, where: $where) {
id
avatarUrl
}
}
`;

View File

@ -0,0 +1,10 @@
import { gql } from '@apollo/client';
export const UPDATE_ALLOW_IMPERSONATION = gql`
mutation UpdateAllowImpersonation($allowImpersonation: Boolean!) {
allowImpersonation(allowImpersonation: $allowImpersonation) {
id
allowImpersonation
}
}
`;

View File

@ -0,0 +1,7 @@
import { gql } from '@apollo/client';
export const UPDATE_PROFILE_PICTURE = gql`
mutation UploadProfilePicture($file: Upload!) {
uploadProfilePicture(file: $file)
}
`;

View File

@ -0,0 +1,29 @@
import { gql } from '@apollo/client';
export const UPDATE_USER = gql`
mutation UpdateUser($data: UserUpdateInput!, $where: UserWhereUniqueInput!) {
updateUser(data: $data, where: $where) {
id
email
displayName
firstName
lastName
avatarUrl
workspaceMember {
id
workspace {
id
domainName
displayName
logo
inviteHash
}
}
settings {
id
locale
colorScheme
}
}
}
`;

View File

@ -1,5 +1,4 @@
import { gql } from '@apollo/client';
export * from './update';
export const GET_CURRENT_USER = gql`
query GetCurrentUser {
@ -31,15 +30,3 @@ export const GET_CURRENT_USER = gql`
}
}
`;
export const GET_USERS = gql`
query GetUsers {
findManyUser {
id
email
displayName
firstName
lastName
}
}
`;

View File

@ -0,0 +1,13 @@
import { gql } from '@apollo/client';
export const GET_USERS = gql`
query GetUsers {
findManyUser {
id
email
displayName
firstName
lastName
}
}
`;

View File

@ -1,61 +0,0 @@
import { gql } from '@apollo/client';
export const UPDATE_USER = gql`
mutation UpdateUser($data: UserUpdateInput!, $where: UserWhereUniqueInput!) {
updateUser(data: $data, where: $where) {
id
email
displayName
firstName
lastName
avatarUrl
workspaceMember {
id
workspace {
id
domainName
displayName
logo
inviteHash
}
}
settings {
id
locale
colorScheme
}
}
}
`;
export const UPDATE_ALLOW_IMPERONATION = gql`
mutation UpdateAllowImpersonation($allowImpersonation: Boolean!) {
allowImpersonation(allowImpersonation: $allowImpersonation) {
id
allowImpersonation
}
}
`;
export const UPDATE_PROFILE_PICTURE = gql`
mutation UploadProfilePicture($file: Upload!) {
uploadProfilePicture(file: $file)
}
`;
export const REMOVE_PROFILE_PICTURE = gql`
mutation RemoveProfilePicture($where: UserWhereUniqueInput!) {
updateUser(data: { avatarUrl: null }, where: $where) {
id
avatarUrl
}
}
`;
export const DELETE_USER_ACCOUNT = gql`
mutation DeleteUserAccount {
deleteUserAccount {
id
}
}
`;