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 CREATE_VIEW_FIELDS = gql`
|
||||
mutation CreateViewFields($data: [ViewFieldCreateManyInput!]!) {
|
||||
createManyViewField(data: $data) {
|
||||
count
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -0,0 +1,9 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const CREATE_VIEW_SORTS = gql`
|
||||
mutation CreateViewSorts($data: [ViewSortCreateManyInput!]!) {
|
||||
createManyViewSort(data: $data) {
|
||||
count
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -0,0 +1,9 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const DELETE_VIEW_SORTS = gql`
|
||||
mutation DeleteViewSorts($where: ViewSortWhereInput!) {
|
||||
deleteManyViewSort(where: $where) {
|
||||
count
|
||||
}
|
||||
}
|
||||
`;
|
||||
16
front/src/modules/views/graphql/mutations/updateViewField.ts
Normal file
16
front/src/modules/views/graphql/mutations/updateViewField.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_VIEW_FIELD = gql`
|
||||
mutation UpdateViewField(
|
||||
$data: ViewFieldUpdateInput!
|
||||
$where: ViewFieldWhereUniqueInput!
|
||||
) {
|
||||
updateOneViewField(data: $data, where: $where) {
|
||||
id
|
||||
fieldName
|
||||
isVisible
|
||||
sizeInPx
|
||||
index
|
||||
}
|
||||
}
|
||||
`;
|
||||
14
front/src/modules/views/graphql/mutations/updateViewSort.ts
Normal file
14
front/src/modules/views/graphql/mutations/updateViewSort.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_VIEW_SORT = gql`
|
||||
mutation UpdateViewSort(
|
||||
$data: ViewSortUpdateInput!
|
||||
$where: ViewSortWhereUniqueInput!
|
||||
) {
|
||||
viewSort: updateOneViewSort(data: $data, where: $where) {
|
||||
direction
|
||||
key
|
||||
name
|
||||
}
|
||||
}
|
||||
`;
|
||||
16
front/src/modules/views/graphql/queries/getViewFields.ts
Normal file
16
front/src/modules/views/graphql/queries/getViewFields.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_VIEW_FIELDS = gql`
|
||||
query GetViewFields(
|
||||
$where: ViewFieldWhereInput
|
||||
$orderBy: [ViewFieldOrderByWithRelationInput!]
|
||||
) {
|
||||
viewFields: findManyViewField(where: $where, orderBy: $orderBy) {
|
||||
id
|
||||
fieldName
|
||||
isVisible
|
||||
sizeInPx
|
||||
index
|
||||
}
|
||||
}
|
||||
`;
|
||||
11
front/src/modules/views/graphql/queries/getViewSorts.ts
Normal file
11
front/src/modules/views/graphql/queries/getViewSorts.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_VIEW_SORTS = gql`
|
||||
query GetViewSorts($where: ViewSortWhereInput) {
|
||||
viewSorts: findManyViewSort(where: $where) {
|
||||
direction
|
||||
key
|
||||
name
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user