What is GraphQL?
GraphQL is a new language that has changed how a web server exposes data and how the client consumes it. Considering our application’s data structure, we could map every data source to a graph of nodes (objects) and edges (relations) to connect them.
Here’s a quick example of a GraphQL query that maps a family and its members:
query {   family(id: 5) {     id     members {       fullName       friends {         fullName       }     }   } }
By reading our first GraphQL query, we can immediately understand the relation hierarchy. A Family
entity has many Person
as a members
array property. Each item of members
may have some Person
entities as friends
. Commonly, a GQL request string is called a GQL document.
The JSON response to our GQL...