feat: create ViewField model (#961)

* feat: create ViewField model

- Created ViewField prisma model
- Added ViewField server resolvers for findMany/updateOne
- Added getViewFields/updateViewField graphql queries

Closes #849

* chore: update node version in .nvmrc files
This commit is contained in:
Thaïs
2023-07-27 18:12:26 +02:00
committed by GitHub
parent e90f44bbfb
commit 9027406fdf
17 changed files with 512 additions and 3 deletions

View File

@ -0,0 +1,13 @@
import { gql } from '@apollo/client';
export const GET_VIEW_FIELDS = gql`
query GetViewFields($where: ViewFieldWhereInput) {
viewFields: findManyViewField(where: $where) {
id
fieldName
isVisible
sizeInPx
index
}
}
`;

View 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
}
}
`;