diff --git a/services/graphql/src/definitions/customer.js b/services/graphql/src/definitions/customer.js index cd5f0cd..aa2e1bd 100644 --- a/services/graphql/src/definitions/customer.js +++ b/services/graphql/src/definitions/customer.js @@ -215,7 +215,7 @@ input CustomerExternalIdsInput { input RapidCustomerIdentificationMutationInput { "The product ID to associate with this rapid identification." - productId: Int! + productId: Int "The customer's email address." email: String! "First name of customer, up to 100 characters long" diff --git a/services/graphql/src/resolvers/customer.js b/services/graphql/src/resolvers/customer.js index ce03387..bb460cd 100644 --- a/services/graphql/src/resolvers/customer.js +++ b/services/graphql/src/resolvers/customer.js @@ -371,7 +371,7 @@ module.exports = { const promoCode = input.promoCode ? input.promoCode.trim() : null; if (promoCode && promoCode.length > 50) throw new UserInputError('The promo code must be 50 characters or fewer.'); - const productMap = new Map([[input.productId, true]]); + const productMap = new Map([...(input.productId ? [[input.productId, true]] : [])]); const deploymentTypeIdMap = input.deploymentTypeIds.reduce((map, id) => { map.set(id, true);