sdy

create category queries

1 +import { gql } from "apollo-boost";
2 +
3 +export const GET_CATEGORIRES = gql`
4 + {
5 + getCategories {
6 + id
7 + name
8 + }
9 + }
10 +`;
11 +
12 +export const ADD_CATEGORY = gql`
13 + mutation addCategory($name: String!) {
14 + addCategory(name: $name) {
15 + id
16 + name
17 + }
18 + }
19 +`;
20 +
21 +export const EDIT_CATEGORY = gql`
22 + mutation editCategory($name: String!) {
23 + editCategory(name: $name) {
24 + id
25 + name
26 + }
27 + }
28 +`;
29 +
30 +export const DELETE_CATEGORY = gql`
31 + mutation deleteCategory($name: String!) {
32 + deleteCategory(name: $name)
33 + }
34 +`;