Feat/metadata add update and delete on frontend (#2102)

* Reworked metadata creation

* Wip

* Fix from PR

* Removed consolelog

* Post merge

* Fixed seeds
This commit is contained in:
Lucas Bordeau
2023-10-18 16:48:11 +02:00
committed by GitHub
parent 21c2834f52
commit 547a17b145
23 changed files with 482 additions and 77 deletions

View File

@ -1,15 +1,15 @@
import { gql } from '@apollo/client';
export const CREATE_ONE_OBJECT = gql`
mutation CreateOneObject($input: CreateOneObjectInput!) {
export const CREATE_ONE_METADATA_OBJECT = gql`
mutation CreateOneMetadataObject($input: CreateOneObjectInput!) {
createOneObject(input: $input) {
id
}
}
`;
export const CREATE_ONE_FIELD = gql`
mutation CreateOneField($input: CreateOneFieldInput!) {
export const CREATE_ONE_METADATA_FIELD = gql`
mutation CreateOneMetadataField($input: CreateOneFieldInput!) {
createOneField(input: $input) {
id
type
@ -26,3 +26,25 @@ export const CREATE_ONE_FIELD = gql`
}
}
`;
export const UPDATE_ONE_METADATA_FIELD = gql`
mutation UpdateOneMetadataField(
$idToUpdate: ID!
$updatePayload: UpdateFieldInput!
) {
updateOneField(input: { id: $idToUpdate, update: $updatePayload }) {
id
}
}
`;
export const UPDATE_ONE_METADATA_OBJECT = gql`
mutation UpdateOneMetadataObject(
$idToUpdate: ID!
$updatePayload: UpdateObjectInput!
) {
updateOneObject(input: { id: $idToUpdate, update: $updatePayload }) {
id
}
}
`;

View File

@ -1,6 +1,6 @@
import { gql } from '@apollo/client';
export const GET_ALL_OBJECTS = gql`
export const FIND_MANY_METADATA_OBJECTS = gql`
query MetadataObjects {
objects {
edges {