|
- import apollo from "../../lib/apollo.js";
-
- async function GetYGP(token="") {
- var res = await apollo.query(
- `
- query {
- accessories(where: { category: "YGP" }) {
- id
- name
- description
- price
- part_code
- img {
- url
- }
- }
- }`,
- token
- );
- return res;
- }
-
- async function GetYamalube(token="") {
- var res = await apollo.query(
- `
- query {
- accessories(where: { category: "Yamalube" }) {
- id
- name
- description
- price
- part_code
- img {
- url
- }
- }
- }`,
- token
- );
- return res;
- }
-
- module.exports = {
- GetYGP:GetYGP,
- GetYamalube:GetYamalube,
- };
|