9
front/src/modules/views/graphql/mutations/createViews.ts
Normal file
9
front/src/modules/views/graphql/mutations/createViews.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const CREATE_VIEWS = gql`
|
||||
mutation CreateViews($data: [ViewCreateManyInput!]!) {
|
||||
createManyView(data: $data) {
|
||||
count
|
||||
}
|
||||
}
|
||||
`;
|
||||
10
front/src/modules/views/graphql/mutations/updateView.ts
Normal file
10
front/src/modules/views/graphql/mutations/updateView.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_VIEW = gql`
|
||||
mutation UpdateView($data: ViewUpdateInput!, $where: ViewWhereUniqueInput!) {
|
||||
updateOneView(data: $data, where: $where) {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
`;
|
||||
10
front/src/modules/views/graphql/queries/getViews.ts
Normal file
10
front/src/modules/views/graphql/queries/getViews.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_VIEWS = gql`
|
||||
query GetViews($where: ViewWhereInput) {
|
||||
views: findManyView(where: $where) {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user