Added basic pages for template editing BOD-85
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user