5

I am using createEmptyCart mutation for create customer Quote Id or Mast Id.

createEmptyCart mutation write in vendor/magento/module-quote-graph-ql/etc/schema.graphqls file and use resolver file Magento\QuoteGraphQl\Model\Resolver\CreateEmptyCart. But in this Resolver file $customerId = $context->getUserId(); getting blank customer id, I have not idea how to set user id or customer id in ContextInterface, We need to set in GraphQA query or API header.

Please let me know if anyone have idea.

1 Answer 1

7

Finally found the issue, We need to set customer token to API header.

Authorization Bearer xxxxiuaqxih8va3wbkji691517xxxxxx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.