Drupal and GraphQL
GraphQL, a query language created by Facebook for describing data requirements on complex application data models. Decoupling your content management system enables front-end developers to fully control an application or site's rendered markup and user experience. Furthermore, the use of client-side frameworks helps developers give websites application-like behavior with smoother interactivity (there is never a need to hit refresh, because new data appears automatically), optimistic feedback (a response appears before the server has processed a user's query), and non-blocking user interfaces (the user can continue to interact with the application while portions are still loading).
One of the most difficult issues facing front-end developers is network performance with REST.
Decoupling thus reveals the need to investigate better ways of exposing data to the client side. As our pages and applications become ever more component-driven, the complexity of the queries we must perform and our demands on their performance increase. What if we could extract only the data we need by writing queries that are efficient and performant by default? Sebastian Siemssen proposes using Facebook's GraphQL (see demo video and project on drupal.org) due to the client's explicit definition of what schema to return and the use of consolidated queries which break apart into smaller calls and recombine for the response, thereby minimizing round trips.
It means that decoupled sites will enjoy better overall performance and give front-end developers a better experience: very few round trips to the server, no need for custom endpoints, no need for versioning, and no dependence on back-end developers.
Layout management, security, and content previews are unaffected, and within page components, front-end application logic can work its magic.
Disadvantage : Projects and the architecture can get messy, fast and confusing for developers that come on/off the project; necessitating a need for a strong governance model and a well thought out and communicated architecture for how to deal with the decoupled nature of the project.
What we will discuss?
What is GraphQL?
Why to use GraphQL?
How GraphQL works?
Drupal Application - Real world scenarios
Creating contributed module for this?
Detailed Demo to show how Drupal can interact with GraphQL and its benefits to the site