Added deleting of custom templates for BOD-85.
This commit is contained in:
@@ -25,6 +25,7 @@ export const QUERY_TEMPLATE_BY_PK = gql`
|
||||
query QUERY_TEMPLATE_BY_PK($templateId: uuid!) {
|
||||
templates_by_pk(id: $templateId) {
|
||||
id
|
||||
name
|
||||
query
|
||||
html
|
||||
}
|
||||
@@ -42,3 +43,21 @@ export const UPDATE_TEMPLATE = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_TEMPLATE = gql`
|
||||
mutation INSERT_TEMPLATE($template: templates_insert_input!) {
|
||||
insert_templates(objects: [$template]) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_TEMPLATE = gql`
|
||||
mutation DELETE_TEMPLATE($templateId: uuid!) {
|
||||
delete_templates(where: { id: { _eq: $templateId } }) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user