This module provides a basic example on how to extend the oxid-esales/graphql-base module.
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
$ 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.
- 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"
}
]
}
}
$ composer test
- install this module into a running OXID eShop
- change the
test_config.yml
- add
oe/graphql-example
to thepartial_module_paths
- set
activate_all_modules
totrue
- add
$ ./vendor/bin/runtests
GPLv3, see LICENSE file.