GraphQL is a query language. One can run query on the data provided by your application, in our case TYPO3 CMS. GraphQL is very much like running query on data sent by REST  API. It is more like using REST data an advanced features.

About GraphQL

  • GraphQL allows us to run query on data exposed by our APIs
  • GraphQL grabs only what is required instead of all the data like in case of a REST
  • You can grab data from multiple resources in one single request
  • It comes with powerful tool GraphiQL for development

Visit https://graphql.org/ for more details.

 

GraphiQL 

  • By default GraphQL endpoint exposed at port number 8080
  • In order to enable debugging mode with additional validation, error handling and reporting - add to the query string "?debug=1" to the endpoint

Install GraphQL in TYPO3

To enable GraphQL in TYPO3 you would need to install the "cms-graphql" extension. Please get the latest code and installation instruction from the github page at https://github.com/TYPO3-Initiatives/graphql 

It depends on externals libs like

  • "hoa/compiler"
  • "webmozart/assert"
  • "webonyx/graphql-php"

Use composer for smooth installation.