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 you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.