Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 

1 rad
5.7 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 id\n name\n price\n description\n spesifikasi_mesin\n spesifikasi_dimensi\n spesifikasi_rangka\n spesifikasi_kelistrikan\n film\n stock\n img{\n url\n }\n overview1\n img_overview1{\n url\n }\n overview2\n img_overview2{\n url\n }\n overview3\n img_overview3{\n url\n }\n overview4\n img_overview4{\n url\n }\n overview5\n img_overview5{\n url\n }\n overview6\n img_overview6{\n url\n }\n overview7\n img_overview7{\n url\n }\n overview8\n img_overview8{\n url\n }\n overview9\n img_overview9{\n url\n }\n overview10\n img_overview10{\n url\n }\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\nasync function GetProductSuzuki(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { business_partner: \"2\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductHonda(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { business_partner: \"3\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nasync function GetProductHino(token = \"\") {\n var res = await _apollo.default.query(`\n query {\n products(where: { business_partner: \"4\" }) {\n id\n name\n price\n img {\n url\n }\n }\n }`, token);\n return res;\n}\n\nmodule.exports = {\n //yamaha\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 //suzuki\n GetProductSuzuki: GetProductSuzuki,\n //honda\n GetProductHonda: GetProductHonda,\n //hino\n GetProductHino: GetProductHino,\n //detail\n GetDetailProduct: GetDetailProduct\n};","map":null,"metadata":{},"sourceType":"script"}