@stackend/api
Version:
JS bindings to api.stackend.com
11 lines • 1.36 kB
JavaScript
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var fullProductQuery_1 = __importDefault(require("./fullProductQuery"));
function cartQuery(getProductData, imageMaxWidth) {
return "\n id,\n createdAt,\n updatedAt,\n lines(first: 100) {\n edges {\n node {\n id,\n merchandise {\n ... on ProductVariant {\n id,\n product {\n ".concat(getProductData ? (0, fullProductQuery_1.default)(imageMaxWidth, true) : 'handle', "\n }\n }\n },\n quantity,\n attributes { key, value },\n discountAllocations {\n discountedAmount { amount, currencyCode }\n },\n estimatedCost {\n subtotalAmount { amount, currencyCode },\n totalAmount { amount, currencyCode }\n }\n }\n }\n },\n attributes { key, value },\n estimatedCost {\n totalAmount { amount, currencyCode },\n subtotalAmount { amount, currencyCode },\n totalTaxAmount { amount, currencyCode },\n totalDutyAmount { amount, currencyCode }\n },\n buyerIdentity {\n countryCode\n }\n");
}
exports.default = cartQuery;
//# sourceMappingURL=cartQuery.js.map