3

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.

3

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

Authorization Bearer xxxxiuaqxih8va3wbkji691517xxxxxx
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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