Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

1 wiersz
3.9 KiB

  1. {"ast":null,"code":"\"use strict\";\n\nvar _apollo = _interopRequireDefault(require(\"../../lib/apollo.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nasync function GetDetailProduct(id, token = \"\") {\n var res = await _apollo.default.query(`\n query($input: ID!){\n products(where:{id:$input})\n {\n name\n price\n description\n img{\n url\n }\n overview\n specification\n film\n stock\n }\n }\t`, token, {\n \"input\": id\n });\n return res;\n}\n\nasync function GetProductMatic(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"matic\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductMaxi(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"maxi\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductNaked(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"naked\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductSport(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"sport\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductOffRoad(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"offroad\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductMoped(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"moped\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductMonsterEnergy(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"monsterenergy\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductCBU(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"cbu\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductATV(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"atv\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductPowerProduct(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { categories: \"powerproduct\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nmodule.exports = {\n GetDetailProduct: GetDetailProduct,\n GetProductMatic: GetProductMatic,\n GetProductMaxi: GetProductMaxi,\n GetProductNaked: GetProductNaked,\n GetProductSport: GetProductSport,\n GetProductOffRoad: GetProductOffRoad,\n GetProductMoped: GetProductMoped,\n GetProductMonsterEnergy: GetProductMonsterEnergy,\n GetProductCBU: GetProductCBU,\n GetProductATV: GetProductATV,\n GetProductPowerProduct: GetProductPowerProduct\n};","map":null,"metadata":{},"sourceType":"script"}