Moving queries into dedicated files (#1210)
* Moving queries into dedicated files * fix ci
This commit is contained in:
@ -0,0 +1,9 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const DELETE_USER_ACCOUNT = gql`
|
||||
mutation DeleteUserAccount {
|
||||
deleteUserAccount {
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -0,0 +1,10 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_ALLOW_IMPERSONATION = gql`
|
||||
mutation UpdateAllowImpersonation($allowImpersonation: Boolean!) {
|
||||
allowImpersonation(allowImpersonation: $allowImpersonation) {
|
||||
id
|
||||
allowImpersonation
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -0,0 +1,7 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_PROFILE_PICTURE = gql`
|
||||
mutation UploadProfilePicture($file: Upload!) {
|
||||
uploadProfilePicture(file: $file)
|
||||
}
|
||||
`;
|
||||
29
front/src/modules/users/graphql/mutations/updateUser.ts
Normal file
29
front/src/modules/users/graphql/mutations/updateUser.ts
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
`;
|
||||
13
front/src/modules/users/graphql/queries/getUsers.ts
Normal file
13
front/src/modules/users/graphql/queries/getUsers.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_USERS = gql`
|
||||
query GetUsers {
|
||||
findManyUser {
|
||||
id
|
||||
email
|
||||
displayName
|
||||
firstName
|
||||
lastName
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user