reactioncommerce / reaction

Mailchimp Open Commerce is an API-first, headless commerce platform built using Node.js, React, GraphQL. Deployed via Docker and Kubernetes.
https://mailchimp.com/developer/open-commerce/
GNU General Public License v3.0
12.34k stars 2.17k forks source link

context.validatePermissions is not a function #6492

Open karaarda opened 4 years ago

karaarda commented 4 years ago

Issue Description

context.validatePermissions is not a function at Object.updateOrder (file:///usr/local/src/app/node_modules/@reactioncommerce/api-plugin-orders/src/mutations/updateOrder.js:50:17)

Steps to Reproduce

Simply call the updateOrder query with the context.

Possible Solution

As a work around use context.getInternalContext() instead of context which still has a validatePermissions function.

brent-hoover commented 4 years ago

We are seeing this as well when moving code from 2.x to 3.x. Code that called this mutation that worked no longer works