CategoryQueries.js 531 Bytes
import { gql } from "apollo-boost";

export const GET_CATEGORIRES = gql`
  {
    getCategories {
      id
      name
    }
  }
`;

export const ADD_CATEGORY = gql`
  mutation addCategory($name: String!) {
    addCategory(name: $name) {
      id
      name
    }
  }
`;

export const EDIT_CATEGORY = gql`
  mutation editCategory($name: String!) {
    editCategory(name: $name) {
      id
      name
    }
  }
`;

export const DELETE_CATEGORY = gql`
  mutation deleteCategory($name: String!) {
    deleteCategory(name: $name)
  }
`;