fix: remove aux query to get customer information related with individual discounts

This commit is contained in:
Sérgio Salgado 2021-08-03 20:17:31 +01:00 committed by Josh Harvey
parent 310c9eb009
commit e837ee3e7a
2 changed files with 1 additions and 3 deletions

View file

@ -10,8 +10,7 @@ const resolvers = {
Query: {
customers: (...[, { phone, name, address, id }]) => customers.getCustomersList(phone, name, address, id),
customer: (...[, { customerId }]) => customers.getCustomerById(customerId),
customerFilters: () => filters.customer(),
getCustomersWithDiscounts: (...[, { discounts }]) => loyalty.getCustomersWithDiscounts(discounts)
customerFilters: () => filters.customer()
},
Mutation: {
setCustomer: (root, { customerId, customerInput }, context, info) => {

View file

@ -59,7 +59,6 @@ const typeDef = gql`
customers(phone: String, name: String, address: String, id: String): [Customer] @auth
customer(customerId: ID!): Customer @auth
customerFilters: [Filter] @auth
getCustomersWithDiscounts(discounts: [IndividualDiscountInput]): [Customer] @auth
}
type Mutation {