Log in
Model

AddUserInfoToContext

Magento\CustomerGraphQl\Model\Context\AddUserInfoToContext

What it does

This class adds authenticated user information to the GraphQL context during query execution.

Developers use this to ensure customer identity, permissions, and session data are available throughout GraphQL request processing.

It validates customer authentication, checks website scope restrictions, and populates the context with user ID, type, and customer data.

Public Methods

  • _resetState()
  • setUserContext()
  • execute()
  • getLoggedInCustomerData()