PHPackages                             magmodules/m2-alternate-hreflang-graph-ql - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. magmodules/m2-alternate-hreflang-graph-ql

ActiveMagento2-module

magmodules/m2-alternate-hreflang-graph-ql
=========================================

N/A

1.0.0(11mo ago)0461OSL-3.0PHP

Since Jun 10Pushed 11mo agoCompare

[ Source](https://github.com/magmodules/magento2-alternate-hreflang-graph-ql)[ Packagist](https://packagist.org/packages/magmodules/m2-alternate-hreflang-graph-ql)[ RSS](/packages/magmodules-m2-alternate-hreflang-graph-ql/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Magmodules\_AlternateHreflangGraphQl
====================================

[](#magmodules_alternatehreflanggraphql)

This module provides GraphQL support for the Magento 2 `Magmodules_AlternateHreflang` module ([link](https://www.magmodules.eu/magento2-alternate-hreflang-tags.html)), allowing you to retrieve `hreflang` alternate URLs for products, categories, and CMS pages via GraphQL.

Features
--------

[](#features)

- GraphQL endpoint for retrieving alternate hreflang URLs.
- Per-entity resolvers for:
    - Products
    - Categories
    - CMS Pages
- Uses Magento StoreView context for correct URL resolution.

---

Install via Composer
--------------------

[](#install-via-composer)

Make sure the base module `Magmodules_AlternateHreflang` is already installed.

1. Go to Magento® 2 root folder
2. Enter the following commands to install module:

    ```
    composer require magmodules/m2-alternate-hreflang-graph-ql

    ```
3. Enter following commands to enable module:

    ```
    php bin/magento module:enable Magmodules_AlternateHreflangGraphQl
    php bin/magento setup:upgrade
    php bin/magento cache:clean

    ```
4. If Magento® is running in production mode, deploy static content with the following command:

    ```
    php bin/magento setup:static-content:deploy

    ```

---

Usage
-----

[](#usage)

### Products

[](#products)

```
{
  products(filter: {sku: {eq: "example-sku"}}) {
    items {
      hreflang {
        code
        url
      }
    }
  }
}
```

### Categories

[](#categories)

```
{
  category(id: 3) {
    hreflang {
      code
      url
    }
  }
}
```

### CMS Pages

[](#cms-pages)

```
{
  cmsPage(identifier: "home") {
    title
    hreflang {
      code
      url
    }
  }
}
```

---

Configuration
-------------

[](#configuration)

Ensure that the base module is enabled and that hreflang output is configured in the Magento Admin:

**Stores &gt; Configuration &gt; Magmodules &gt; Alternate Hreflang**

---

Structure
---------

[](#structure)

- `CmsAlternateUrls` – GraphQL resolver for CMS pages
- `CategoryAlternateUrls` – GraphQL resolver for categories
- `ProductAlternateUrls` – GraphQL resolver for products
- `BaseAlternateResolver` – Shared helper logic for formatting response

---

Testing
-------

[](#testing)

Use tools like [GraphiQL](https://github.com/graphql/graphiql) or Magento PWA Studio to test queries.

---

License
-------

[](#license)

See `COPYING.txt`. All rights reserved © Magmodules.eu.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance52

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

337d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34503049?v=4)[Magmodules](/maintainers/Magmodules)[@magmodules](https://github.com/magmodules)

---

Top Contributors

[![Frank-Magmodules](https://avatars.githubusercontent.com/u/24823946?v=4)](https://github.com/Frank-Magmodules "Frank-Magmodules (1 commits)")[![Marvin-Magmodules](https://avatars.githubusercontent.com/u/20815641?v=4)](https://github.com/Marvin-Magmodules "Marvin-Magmodules (1 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/magmodules-m2-alternate-hreflang-graph-ql/health.svg)

```
[![Health](https://phpackages.com/badges/magmodules-m2-alternate-hreflang-graph-ql/health.svg)](https://phpackages.com/packages/magmodules-m2-alternate-hreflang-graph-ql)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
