From f191882f821c1ea166fb423ff3bd39158f25da25 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Sat, 6 May 2023 10:25:36 -0400 Subject: Add PantryItemLabel with GraphQL query and mutation --- src/main/webui/src/gql/labels.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/main/webui/src/gql/labels.ts (limited to 'src/main/webui') diff --git a/src/main/webui/src/gql/labels.ts b/src/main/webui/src/gql/labels.ts new file mode 100644 index 0000000..801e24b --- /dev/null +++ b/src/main/webui/src/gql/labels.ts @@ -0,0 +1,21 @@ +import { graphql } from "./conf/gql"; + +export const queryAllLabels = graphql(` + query allLabels { + allLabels { + id + title + color + } + } +`); + +export const mutationSyncLabels = graphql(` + mutation syncLabels($labels: [PantryItemLabelInput]) { + syncLabels(labels: $labels) { + id + title + color + } + } +`); -- cgit