This extension shows how the GraphQL integration of the TYPO3 Datahandler & Persistence Initiative could be used as a basic HTTP endpoint.
This implementation is a proof-of-concept prototype and thus experimental development. This extension should not be used for production sites.
Install the latest development of TYPO3 CMS using Composer, add the dependend repositories and add this package as a dependency:
composer create-project typo3/cms-base-distribution:dev-master .
composer config minimum-stability dev
composer config repositories.cms-configuration git https://github.com/typo3-initiatives/configuration
composer config repositories.cms-security git https://github.com/typo3-initiatives/security
composer config repositories.cms-graphql git https://github.com/typo3-initiatives/graphql
composer config repositories.graphql-example git https://github.com/witrin/graphql-example
composer require example/graphql:dev-master
Use HTTP POST at /api
for your GraphQL queries. The Content-Type
must be application/json
with the following body:
{
"variables": {
...
},
"query": "..."
}
The language aspect of your query can be set through the HTTP header Accept-Language
but only the first entry will be processed if set (e.g. Accept-Language: en-US
).
For more detailed information about the integration of GraphQL checkout the draft and its latest development.