oxid-esales / graphql-example
OXID eSales GraphQL example module
Installs: 69
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 14
Forks: 1
Type:oxideshop-module
pkg:composer/oxid-esales/graphql-example
Requires
- php: ^7.1
- oxid-esales/graphql-base: ^1.3.0
Requires (Dev)
- jakub-onderka/php-parallel-lint: ^1.0
- oxid-esales/oxideshop-ce: 6.5
- phpstan/phpstan: ^0.12
- phpunit/phpunit: ~7.5
- squizlabs/php_codesniffer: ^3.5.1
This package is auto-updated.
Last update: 2020-07-06 09:50:35 UTC
README
This module is abandoned. Please look at oxid-esales/graphql-catalogue for good examples instead.
This module provides a basic example on how to extend the oxid-esales/graphql-base module.
Usage
This assumes you have the OXID eShop up and running and installed and activated the oxid-esales/graphql-base module.
DO NOT USE IN PRODUCTION, THIS MODULE IS FOR DEMO PURPOSES ONLY
Install
$ composer require oxid-esales/graphql-example
After requiring the module, you need to head over to the OXID eShop admin and activate the GraphQL Example module.
How to use
- Install oxid-esales/graphql-base module
- Get token (see base module documentation)
- Execute example query to get all categories
Request query
query { categories { id name } }
Response example
{
"data": {
"categories": [
{
"id": "30e44ab83fdee7564.23264141",
"name": "Bekleidung"
},
{
"id": "943173edecf6d6870a0f357b8ac84d32",
"name": "Wakeboarding"
},
{
"id": "943a9ba3050e78b443c16e043ae60ef3",
"name": "Kiteboarding"
},
{
"id": "fadcb6dd70b9f6248efa425bd159684e",
"name": "Angebote"
},
{
"id": "oia9ff5c96f1f29d527b61202ece0829",
"name": "Downloads"
}
]
}
}
Testing
Linting, syntax, static analysis and unit tests
$ composer test
Integration tests
- install this module into a running OXID eShop
- change the
test_config.yml- add
oe/graphql-exampleto thepartial_module_paths - set
activate_all_modulestotrue
- add
$ ./vendor/bin/runtests
License
GPLv3, see LICENSE file.