55 lines
1.2 KiB
JavaScript
55 lines
1.2 KiB
JavaScript
import gql from "graphql-tag";
|
|
import {FRAGMENT_ORGANIZATION_FULL_INFO} from "src/graphql/fragments/organization";
|
|
|
|
export const CREATE_ORGANIZATION = gql`
|
|
mutation createOrganization($input: CreateOrganizationInput!) {
|
|
createOrganization(input: $input) {
|
|
...organizationFullInfo
|
|
}
|
|
}
|
|
|
|
${FRAGMENT_ORGANIZATION_FULL_INFO}
|
|
`;
|
|
|
|
export const EDIT_ORGANIZATION = gql`
|
|
mutation editOrganization($id: Int!, $input: EditOrganizationInput!) {
|
|
editOrganization(id: $id, input: $input) {
|
|
...organizationFullInfo
|
|
}
|
|
}
|
|
|
|
${FRAGMENT_ORGANIZATION_FULL_INFO}
|
|
`;
|
|
|
|
export const ADD_USER_TO_ORGANIZATION = gql`
|
|
mutation addToOrganization($organizationId: Int!) {
|
|
addToOrganization(organizationId: $organizationId) {
|
|
users {
|
|
id
|
|
name
|
|
email
|
|
avatarImageUrl
|
|
}
|
|
}
|
|
}`;
|
|
|
|
export const REMOVE_USER_FROM_ORGANIZATION = gql`
|
|
mutation removeFromOrganization($organizationId: Int!) {
|
|
removeFromOrganization(organizationId: $organizationId) {
|
|
users {
|
|
id
|
|
name
|
|
email
|
|
avatarImageUrl
|
|
}
|
|
}
|
|
}`;
|
|
|
|
// export const DELETE_ORGANIZATION = gql`
|
|
// mutation deleteOrganization($id: Int!) {
|
|
// deleteOrganization(id: $id) {
|
|
// id
|
|
// }
|
|
// }
|
|
// `;
|