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:
@ -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
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user