Added basic pages for template editing BOD-85

This commit is contained in:
Patrick Fic
2020-05-11 21:32:11 -07:00
parent 630e7df3fd
commit b518f84f5f
20 changed files with 455 additions and 197 deletions

View File

@@ -11,3 +11,34 @@ export const QUERY_TEMPLATES_BY_NAME = gql`
}
}
`;
export const QUERY_CUSTOM_TEMPLATES = gql`
query QUERY_CUSTOM_TEMPLATES {
templates(where: { bodyshopid: { _is_null: false } }) {
id
name
}
}
`;
export const QUERY_TEMPLATE_BY_PK = gql`
query QUERY_TEMPLATE_BY_PK($templateId: uuid!) {
templates_by_pk(id: $templateId) {
id
query
html
}
}
`;
export const UPDATE_TEMPLATE = gql`
mutation UPDATE_TEMPLATE(
$templateId: uuid!
$template: templates_set_input!
) {
update_templates(where: { id: { _eq: $templateId } }, _set: $template) {
returning {
id
}
}
}
`;