Showing
1 changed file
with
34 additions
and
0 deletions
front/src/Routes/Category/CategoryQueries.js
0 → 100644
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 | +`; |
-
Please register or login to post a comment