📊 State of Magento 2025

The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

613 Modules
401 Ready
211 Need Help
🏆 Leaderboard
Top 10% by Downloads Potentially Abandoned v1.0.4

Hyvä Themes - GraphQL Tokens module

hyva-themes/magento2-graphql-tokens

Adds GraphQL tokens (signin, cartId, storeViewCode) to customer and cart sections. Enables GraphQL calls from Magento templates, supporting guest carts and store code settings.

2,382,496
Downloads
11x above avg
24
GitHub Stars
Below average
4y ago
Last Release
0
Open Issues
Build Passing
Ready to install

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
7 warnings
PHPStan Failed

Tested on Magento 2.4.8-p3

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.0.4 on Magento 2.4.8-p3
Dec 30, 2025

Share This Module's Status

Hyvä Themes - GraphQL Tokens module Magento compatibility status badge

README

Loaded from GitHub

Hyvä Themes - GraphQL Tokens module

Hyvä Themes

hyva-themes/magento2-graphql-tokens

Supported Magento Versions

This module adds GraphQL tokens to the CustomerData sections to enable GraphQL calls from a Magento template.

Compatible with Magento 2.3.4 and higher.

What does it do?

It adds:

  • signin_token to the customer section
  • cartId to the cart section
  • storeViewCode to the cart section

The CartId is the masked cartId that is needed for guest carts. The storeViewCode is needed to set the store-code on GraphqQl requests.

When logged in, the customer signin_token can be used to get the real cart id.

Installation

  1. Install via composer
    composer config repositories.hyva-themes/magento2-graphql-tokens git git@github.com:hyva-themes/magento2-graphql-tokens.git
    composer require hyva-themes/magento2-graphql-tokens
    
  2. Enable module
    bin/magento setup:upgrade
    

Configuration

No configuration needed.

How does it work?

There are after-plugins that add the tokens to the individual sections.

If a token already exists, it uses the existing one. Otherwise, a fresh token is generated on the fly.

Credits

License

This package is licensed under the Open Software License (OSL 3.0).

  • Copyright: Copyright © 2020-present Hyvä Themes. All rights reserved.
  • License Text (OSL 3.0): The full text of the OSL 3.0 license can be found in the LICENSE.txt file within this package, and is also available online at http://opensource.org/licenses/osl-3.0.php.

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.