oxid-esales / graphql-storefront
OXID eSales GraphQL storefront module
Installs: 32 905
Dependents: 1
Suggesters: 0
Security: 0
Stars: 20
Watchers: 9
Forks: 8
Type:oxideshop-module
Requires
- php: ^8.2
- doctrine/dbal: ^v2.7
- oxid-esales/graphql-base: v10.0.0
Requires (Dev)
- codeception/c3: ^2.9
- codeception/codeception: ^5.0
- codeception/module-asserts: ^3.0
- codeception/module-db: *
- codeception/module-phpbrowser: ^3.0
- codeception/module-rest: ^3.3
- mikey179/vfsstream: ^1.6
- oxid-esales/codeception-modules: dev-b-7.2.x
- oxid-esales/oxideshop-ce: dev-b-7.2.x
- phpmd/phpmd: ^2.11
- phpstan/phpstan: ^1.10.58
- phpunit/phpunit: ^10.4
- qossmic/deptrac-shim: ^1.0.2
- squizlabs/php_codesniffer: 3.*
- dev-b-7.3.x
- dev-b-7.2.x
- dev-b-7.1.x
- v4.0.0
- v4.0.0-rc.1
- v3.1.0
- v3.1.0-rc.1
- v3.0.0
- v2.1.0
- v2.0.1
- v2.0.0
- v1.0.0
- v1.0.0-rc1
- v0.1.0
- dev-b-7.3.x-fix-OXDEV-8625
- dev-b-7.3.x-OXDEV-8625
- dev-b-7.2.x-GHAv0
- dev-b-8.0.x-compatibility-OXDEV-7248
- dev-b-7.2.x-add_mariadb-OXDEV-8008
- dev-b-7.1.x_remove_authorization_protection
- dev-b-7.1.x-OXDEV-8295
- dev-b-7.0.x
- dev-b-6.5.x
- dev-b-6.4.x
- dev-PR-13
- dev-PR-11
- dev-test-dependency
- dev-master
- dev-b-6.5.x_OAI_Spike-OXDEV-6060
- dev-b-6.5.x-refactor_tests
- dev-pr11
- dev-pr10
- dev-b-6.5.x_improve_styles_run
- dev-master-restore-productId-in-AddItem-events
- dev-b-6.5.x-improvements-OXDEV-4888
- dev-b-6.5.x_backport_from_master-OXDEV-5214
- dev-master-b-6.5.x-merge
- dev-b-6.5.x-adjust_github_actions-OXDEV-5160
- dev-master-fix_user_switch-OXDEV-5002
- dev-b-6.3.x
- dev-b-6.2.x
- dev-b-6.4.x-services-OXDEV-4968
- dev-b-6.3.x-improvements-OXDEV-4888
- dev-master_extend_test-OXDEV-4790
- dev-master-anonymous_basket-OXDEV-4354-event
This package is auto-updated.
Last update: 2025-02-21 16:12:31 UTC
README
This module provides GraphQL queries and mutations for the OXID eShop storefront.
Usage
This assumes you have OXID eShop (at least oxid-esales/oxideshop_ce: v7.0.0
component, which is part of the v7.0.0
compilation) up and running.
Branch compatibility
- b-7.3.x branch is compatible with OXID eShop compilation b-7.3.x (which uses
graphql-base
b-7.3.x branch) - 4.0.x versions (or b-7.2.x branch) are compatible with OXID eShop compilation b-7.2.x (which uses
graphql-base
10.x version resp. b-7.2.x branch) - 3.1.x versions (or b-7.1.x branch) are compatible with OXID eShop compilation b-7.1.x (which uses
graphql-base
9.x version resp. b-7.1.x branch) - 3.x versions (or b-7.0.x branch) are compatible with OXID eShop compilation b-7.0.x (which uses
graphql-base
8.x version resp. b-7.0.x branch) - ^2.1 versions (b-6.5.x branch) are compatible with OXID eShop compilation b-6.5.x (which uses
graphql-base
7.x version resp. b-6.5.x branch) - 2.0.x versions (b-6.4.x branch) are compatible with OXID eShop compilation b-6.4.x (which uses
graphql-base
6.x version resp. b-6.4.x branch) - 1.x versions (b-6.3.x branch) are compatible with OXID eShop compilation 6.3.x (no PHP8 support)
Install
Switch to the shop root directory (the file composer.json
and the directories source/
and vendor/
are located there).
# Install desired version of oxid-esales/graphql-storefront module, in this case - latest released 3.x version
$ composer require oxid-esales/graphql-storefront ^3.0.0
If you didn't have the oxid-esales/graphql-base
module installed, composer will do that for you.
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 $ vendor/bin/oe-eshop-doctrine_migration migrations:migrate oe_graphql_storefront
After installing the module, you need to activate it, either via OXID eShop admin or CLI.
$ vendor/bin/oe-console oe:module:activate oe_graphql_base $ vendor/bin/oe-console oe:module:activate oe_graphql_storefront
How to use
A good starting point is to check the How to use section in the GraphQL Base Module
Testing
Linting, syntax check, static analysis
$ composer update $ composer static
Unit/Integration/Acceptance 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 tests
$ ./vendor/bin/phpunit -c vendor/oxid-esales/graphql-storefront/tests/phpunit.xml
- run Integration tests
$ ./vendor/bin/phpunit --bootstrap=./source/bootstrap.php -c vendor/oxid-esales/graphql-storefront/tests/phpintegration.xml
- run Acceptance tests
$ SELENIUM_SERVER_HOST=selenium MODULE_IDS=oe_graphql_storefront vendor/bin/codecept run acceptance -c vendor/oxid-esales/graphql-storefront/tests/codeception.yml
Development installation on OXID eShop SDK
The installation instructions below are shown for the current SDK for shop 7.3. Make sure your system meets the requirements of the SDK.
-
Ensure all docker containers are down to avoid port conflicts
-
Clone the SDK for the new project
echo MyProject && git clone https://github.com/OXID-eSales/docker-eshop-sdk.git $_ && cd $_
- Clone the repository to the source directory
git clone --recurse-submodules https://github.com/OXID-eSales/graphql-storefront-module.git --branch=b-7.3.x ./source
- Run the recipe to setup the development environment
./source/recipes/setup-development.sh
You should be able to access the shop with http://localhost.local and the admin panel with http://localhost.local/admin (credentials: noreply@oxid-esales.com / admin)
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
Contributing
You like to contribute? 🙌 AWESOME 🙌
Go and check the contribution guidelines
Build with
License
OXID Module and Component License, see LICENSE file.