PHPackages                             oxid-esales/graphql-base - 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. [API Development](/categories/api)
4. /
5. oxid-esales/graphql-base

ActiveOxideshop-module[API Development](/categories/api)

oxid-esales/graphql-base
========================

OXID eSales GraphQL base module

v12.0.1(2mo ago)24101.0k↓27.1%139proprietaryPHPPHP ^8.2CI passing

Since Nov 5Pushed 2mo ago9 watchersCompare

[ Source](https://github.com/OXID-eSales/graphql-base-module)[ Packagist](https://packagist.org/packages/oxid-esales/graphql-base)[ Docs](https://www.oxid-esales.com)[ RSS](/packages/oxid-esales-graphql-base/feed)WikiDiscussions b-7.5.x Synced 1mo ago

READMEChangelogDependencies (47)Versions (108)Used By (9)

oxid-esales/graphql-base
========================

[](#oxid-esalesgraphql-base)

[![Build Status](https://camo.githubusercontent.com/a7d929116ced3288a31d04afa2c277726333d7bbbff64bba2cc79367537418ba/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f4f5849442d6553616c65732f6772617068716c2d626173652d6d6f64756c652f43493f6c6f676f3d6769746875622d616374696f6e73267374796c653d666f722d7468652d6261646765)](https://github.com/OXID-eSales/graphql-base-module/actions)[![Build Status](https://camo.githubusercontent.com/278e4c1914e2775aea0af2f7751f99f061870526e544c92e8ea16a5b71fcf81c/68747470733a2f2f696d672e736869656c64732e696f2f736f6e61722f7175616c6974795f676174652f4f5849442d6553616c65735f6772617068716c2d626173652d6d6f64756c653f7365727665723d6874747073253341253246253246736f6e6172636c6f75642e696f267374796c653d666f722d7468652d6261646765266c6f676f3d736f6e6172636c6f7564)](https://sonarcloud.io/dashboard?id=OXID-eSales_graphql-base-module)

[![Stable Version](https://camo.githubusercontent.com/a2ca658d08becfad84566a85643e4d95e3ca4d827a3f2330702d47a10bdd76ec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4f5849442d6553616c65732f6772617068716c2d626173653f7374796c653d666f722d7468652d6261646765266c6f676f3d636f6d706f736572266c6162656c3d737461626c65)](https://packagist.org/packages/oxid-esales/graphql-base)[![Latest Version](https://camo.githubusercontent.com/adb2c337c86f824090d54b905fd3cccb67d1cf9ee0aeb6d82760ce9e9d74547a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4f5849442d6553616c65732f6772617068716c2d626173653f7374796c653d666f722d7468652d6261646765266c6f676f3d636f6d706f736572266c6162656c3d6c617465737426696e636c7564655f70726572656c656173657326636f6c6f723d6f72616e6765)](https://packagist.org/packages/oxid-esales/graphql-base)[![PHP Version](https://camo.githubusercontent.com/96ee0ce9ef324cc2ec7b1b488dfc62552f9fc38eb9c5297485986374f8450120/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6f7869642d6573616c65732f6772617068716c2d626173653f7374796c653d666f722d7468652d6261646765)](https://github.com/oxid-esales/graphql-base-module)

This module provides:

- a basic [GraphQL](https://www.graphql.org) implementation for the [OXID eShop](https://www.oxid-esales.com/)
- authorization and authentication using [JWT](https://jwt.io)
- a query to log you in and get a JWT for further authentication

Documentation
-------------

[](#documentation)

- Full documentation, including GraphQL schema, can be found [here](https://docs.oxid-esales.com/interfaces/graphql/en/latest/).

Usage
-----

[](#usage)

This assumes you have OXID eShop (at least `OXID-eSales/oxideshop_ce: v7.5.0` component, which is part of the `7.5.0` compilation) up and running.

Branch Compatibility
--------------------

[](#branch-compatibility)

- 13.0.x versions (or b-7.5.x branch) are compatible with latest shop compilation 7.5.x resp. b-7.5.x shop compilation branches
- 12.0.x versions (or b-7.4.x branch) are compatible with latest shop compilation 7.4.x resp. b-7.4.x shop compilation branches
- 11.0.x versions (or b-7.3.x branch) are compatible with latest shop compilation 7.3.x resp. b-7.3.x shop compilation branches
- 10.0.x versions (or b-7.2.x branch) are compatible with latest shop compilation 7.2.x resp. b-7.2.x shop compilation branches
- 9.x versions (or b-7.1.x branch) are compatible with latest shop compilation 7.1.x resp. b-7.1.x shop compilation branches
- 8.x versions (or b-7.0.x branch) are compatible with latest shop compilation: 7.0.x resp. b-7.0.x shop compilation branches
- 7.x versions (or b-6.5.x branch) are compatible with latest shop compilations: 6.5.x resp. b-6.5.x shop compilation branches
- 6.x versions (or b-6.4.x branch) are compatible with latest shop compilations: 6.4.x resp. b-6.4.x shop compilation branches
- 5.x versions (or b-6.3.x branch) are compatible with latest shop compilations: 6.3.x resp. b-6.3.x shop compilation branches (NOTE: no support for PHP 8 yet)

### Install

[](#install)

```
# Install desired version of oxid-esales/graphql-base module, in this case - latest released 11.x version, While updating the version you should add additional flag --with-all-dependencies with below command.
$ composer require oxid-esales/graphql-base ^12.0.0 --with-all-dependencies
```

You should run migrations both after installing the module and after each module update:

```
$ vendor/bin/oe-eshop-doctrine_migration migrations:migrate oe_graphql_base
```

After requiring the module, you need to activate it, either via OXID eShop admin or CLI.

```
$ bin/oe-console oe:module:activate oe_graphql_base
```

### Update

[](#update)

If you when to update this module from older version to new version. Then run below command to ensure that all dependencies including in the composer.lock are updated that are compatible with each other.

```
$ composer update --with-all-dependencies
```

### How to use

[](#how-to-use)

You can use your favourite GraphQL client to explore the API, if you do not already have one installed, you may use [Altair GraphQL Client](https://altair.sirmuel.design/).

To login and retrieve a token send the following GraphQL query to the server

```
query {
    token (
        username: "noreply@oxid-esales.com",
        password: "admin"
    )
}
```

You could simply fire up your terminal and use `curl` to do a basic check if the GraphQL base module is up and running as expected. To retrieve a valid token you need to replace the username and password below with valid login credentials.

```
$ curl http://oxideshop.local/graphql/ \
  -H 'Content-Type: application/json' \
  --data-binary '{"query":"query {token(username: \"noreply@oxid-esales.com\", password: \"admin\")}"}'
```

You should see a response similar to this:

```
{
    "data": {
        "token": "a-very-long-jwt"
    }
}
```

This `token` is then to be send as your authorization with every request in the HTTP `Authorization` header like this:

```
Authorization: Bearer a-very-long-jwt

```

### How to use refresh tokens

[](#how-to-use-refresh-tokens)

To login and retrieve a refresh and access token send the following GraphQL query to the server:

```
query {
    login (
        username: "noreply@oxid-esales.com",
        password: "admin"
    ) {
        refreshToken
        accessToken
    }
}
```

The response should contain both requested tokens:

```
{
    "data": {
        "login": {
            "accessToken": "the-same-long-jwt-token",
            "refreshToken": "a-255-character-long-string"
        }
    }
}
```

The request will set an `HttpOnly` cookie with unique fingerprint. The `accessToken` claims contain a hashed version of this fingerprint. The access token should be sent as Bearer type authorization as described above. After the access token's lifetime has elapsed, you will need to refresh it. To do this you will need to send the following query:

```
query {
    refresh (
        refreshToken: "your-refresh-token",
        fingerprintHash: "from-access-token-claims"
    )
}
```

If the token is valid and the hash matches the fingerprint sent as cookie, you will receive a fresh token as a response:

```
{
    "data": {
        "refresh": "a-new-long-jwt"
    }
}
```

And along with it, a new fingerprint cookie and `fingerprintHash` claim in the jwt token.

### How to extend

[](#how-to-extend)

The information on extending any module can be found in the [OXID eSales documentation](https://docs.oxid-esales.com).

How to extend GraphQL module types and implement your new mutations and queries is shown in [OXID GraphQL API documentation](https://docs.oxid-esales.com/interfaces/graphql/en/7.0/tutorials/index.html).

Testing
-------

[](#testing)

### Syntax check and static analysis

[](#syntax-check-and-static-analysis)

```
$ composer static
```

### Unit/Integration/Acceptance tests

[](#unitintegrationacceptance-tests)

- install this module into a running OXID eShop
- reset shop's database

```
$ bin/oe-console oe:database:reset --db-host=db-host --db-port=db-port --db-name=db-name --db-user=db-user --db-password=db-password --force
```

- run Unit/Integration tests

```
$ ./vendor/bin/phpunit -c vendor/oxid-esales/graphql-base/tests/phpunit.xml
```

- run Acceptance tests

```
$ SELENIUM_SERVER_HOST=selenium MODULE_IDS=oe_graphql_base vendor/bin/codecept run acceptance -c vendor/oxid-esales/graphql-base/tests/codeception.yml
```

Development installation
========================

[](#development-installation)

To be able running the tests and other preconfigured quality tools, please install the module as a [root package](https://getcomposer.org/doc/04-schema.md#root-package).

The next section shows how to install the module as a root package by using the OXID eShop SDK.

In case of different environment usage, please adjust by your own needs.

Development installation on OXID eShop SDK
==========================================

[](#development-installation-on-oxid-eshop-sdk)

The installation instructions below are shown for the current [SDK](https://github.com/OXID-eSales/docker-eshop-sdk)for shop 7.5. Make sure your system meets the requirements of the SDK.

1. Ensure all docker containers are down to avoid port conflicts
2. Clone the SDK for the new project

```
echo MyProject && git clone https://github.com/OXID-eSales/docker-eshop-sdk.git $_ && cd $_
```

2. Clone the repository to the source directory

```
git clone --recurse-submodules https://github.com/OXID-eSales/graphql-base-module.git --branch=b-7.5.x ./source
```

3. Run the recipe to setup the development environment, you can decide which shop edition to install. Omitting the flag installs EE.

```
./source/recipes/setup-development.sh -s CE
```

You should be able to access the shop with  and the admin panel with (credentials:  / admin)

### Running tests locally

[](#running-tests-locally)

Check the "scripts" section in the `composer.json` file for the available commands. Those commands can be executed by connecting to the php container and running the command from there, example:

```
make php
composer tests-coverage
```

Commands can be also triggered directly on the container with docker compose, example:

```
docker compose exec -T php composer tests-coverage
```

Issues
------

[](#issues)

To report issues with GraphQL module please use the [OXID eShop bugtracking system](https://bugs.oxid-esales.com/).

Contributing
------------

[](#contributing)

You like to contribute? 🙌 AWESOME 🙌
Go and check the [contribution guidelines](CONTRIBUTING.md)

Build with
----------

[](#build-with)

- [GraphQLite](https://graphqlite.thecodingmachine.io/)
- [lcobucci/jwt](https://github.com/lcobucci/jwt)

License
-------

[](#license)

OXID Module and Component License, see [LICENSE file](LICENSE).

###  Health Score

66

—

FairBetter than 99% of packages

Maintenance88

Actively maintained with recent releases

Popularity43

Moderate usage in the ecosystem

Community34

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~45 days

Recently: every ~35 days

Total

52

Last Release

61d ago

Major Versions

v10.0.0 → v11.0.0-rc.12025-04-23

v11.0.0 → v12.0.02025-10-28

v9.0.1 → v10.0.12026-03-18

v10.0.1 → v11.0.12026-03-18

v11.0.1 → v12.0.12026-03-18

PHP version history (6 changes)v1.0.0PHP ^7.1

v5.2.1PHP ^7.3

v6.0.0PHP ^7.4|^8.0

v8.0.0PHP ^8.0

v9.0.0-rc.1PHP ^8.1

v10.0.0-rc.1PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1374817?v=4)[oxid](/maintainers/oxid)[@OxID](https://github.com/OxID)

---

Top Contributors

[![realFlowControl](https://avatars.githubusercontent.com/u/14161194?v=4)](https://github.com/realFlowControl "realFlowControl (415 commits)")[![Sieg](https://avatars.githubusercontent.com/u/98882?v=4)](https://github.com/Sieg "Sieg (235 commits)")[![hkreuter](https://avatars.githubusercontent.com/u/3692295?v=4)](https://github.com/hkreuter "hkreuter (141 commits)")[![MarcelOxid](https://avatars.githubusercontent.com/u/98812941?v=4)](https://github.com/MarcelOxid "MarcelOxid (107 commits)")[![NikolaIvanovski](https://avatars.githubusercontent.com/u/8055347?v=4)](https://github.com/NikolaIvanovski "NikolaIvanovski (56 commits)")[![TitaKoleva](https://avatars.githubusercontent.com/u/22682166?v=4)](https://github.com/TitaKoleva "TitaKoleva (53 commits)")[![angel-dimitrov](https://avatars.githubusercontent.com/u/12593227?v=4)](https://github.com/angel-dimitrov "angel-dimitrov (50 commits)")[![tkcreateit](https://avatars.githubusercontent.com/u/42207462?v=4)](https://github.com/tkcreateit "tkcreateit (48 commits)")[![mtkoltan](https://avatars.githubusercontent.com/u/7591102?v=4)](https://github.com/mtkoltan "mtkoltan (30 commits)")[![RahatHameed](https://avatars.githubusercontent.com/u/11661532?v=4)](https://github.com/RahatHameed "RahatHameed (27 commits)")[![skoczekj](https://avatars.githubusercontent.com/u/42207445?v=4)](https://github.com/skoczekj "skoczekj (21 commits)")[![michaelkeiluweit](https://avatars.githubusercontent.com/u/2961521?v=4)](https://github.com/michaelkeiluweit "michaelkeiluweit (6 commits)")[![oxSteven](https://avatars.githubusercontent.com/u/57273424?v=4)](https://github.com/oxSteven "oxSteven (5 commits)")[![alfredbez](https://avatars.githubusercontent.com/u/1001186?v=4)](https://github.com/alfredbez "alfredbez (4 commits)")[![Juergen-Busch](https://avatars.githubusercontent.com/u/3693753?v=4)](https://github.com/Juergen-Busch "Juergen-Busch (4 commits)")[![kermie](https://avatars.githubusercontent.com/u/1337898?v=4)](https://github.com/kermie "kermie (1 commits)")[![karmrt](https://avatars.githubusercontent.com/u/23190370?v=4)](https://github.com/karmrt "karmrt (1 commits)")[![BenjaminJoerger](https://avatars.githubusercontent.com/u/3601583?v=4)](https://github.com/BenjaminJoerger "BenjaminJoerger (1 commits)")[![vanilla-thunder](https://avatars.githubusercontent.com/u/1874024?v=4)](https://github.com/vanilla-thunder "vanilla-thunder (1 commits)")[![zckman](https://avatars.githubusercontent.com/u/18466068?v=4)](https://github.com/zckman "zckman (1 commits)")

---

Tags

graphqloxidoxid-modulegraphqlOXIDmoduleseshop

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/oxid-esales-graphql-base/health.svg)

```
[![Health](https://phpackages.com/badges/oxid-esales-graphql-base/health.svg)](https://phpackages.com/packages/oxid-esales-graphql-base)
```

###  Alternatives

[aimeos/ai-admin-graphql

Aimeos Admin GraphQL API extension

944100.0k4](/packages/aimeos-ai-admin-graphql)[oxid-esales/graphql-storefront

OXID eSales GraphQL storefront module

2050.4k1](/packages/oxid-esales-graphql-storefront)[thecodingmachine/graphqlite-bundle

A Symfony bundle for thecodingmachine/graphqlite.

371.6M3](/packages/thecodingmachine-graphqlite-bundle)[oxid-esales/graphql-configuration-access

OXID eSales GraphQL configuration access module

141.2k2](/packages/oxid-esales-graphql-configuration-access)[thecodingmachine/graphqlite-laravel

A Laravel service provider package to help you get started with GraphQLite in Laravel.

1852.3k1](/packages/thecodingmachine-graphqlite-laravel)[rubix/server

Deploy your Rubix ML models to production with scalable stand-alone inference servers.

632.3k](/packages/rubix-server)

PHPackages © 2026

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