aboutsummaryrefslogtreecommitdiff
path: root/src/main/webui
diff options
context:
space:
mode:
authorKevin J Hoerr <kjhoerr@protonmail.com>2023-05-06 10:25:36 -0400
committerKevin J Hoerr <kjhoerr@protonmail.com>2025-08-18 12:10:56 -0400
commitf191882f821c1ea166fb423ff3bd39158f25da25 (patch)
tree720d8e67694481cd4821b4e6017f3ef4b43c3444 /src/main/webui
parent25e5f367ff9c8ea787eb4406178cb0522f9de4d1 (diff)
downloadpantry-f191882f821c1ea166fb423ff3bd39158f25da25.tar.gz
pantry-f191882f821c1ea166fb423ff3bd39158f25da25.tar.bz2
pantry-f191882f821c1ea166fb423ff3bd39158f25da25.zip
Add PantryItemLabel with GraphQL query and mutation
Diffstat (limited to 'src/main/webui')
-rw-r--r--src/main/webui/src/gql/labels.ts21
1 files changed, 21 insertions, 0 deletions
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
+ }
+ }
+`);