JSJ 246 GraphQL and Apollo with Uri Goldshtein
GraphQL and Apollo with Uri Goldshtein
On today's episode, Charles Max Wood and Aimee Knight discuss GraphQL and Apollo with Uri Goldshtein. Uri is a core developer at Meteor Development Group, and is an expert with GraphQL and Apollo.
What is GraphQL?
GraphQL is a query language that you can use for your API. With it, you can query data from the client to the server or from the service to the server. In contrast to REST (Representational State Transfer), GraphQL allows you to specify what you want to query and it'll give you exactly what you want. It's similar to a JSON object as well. The good thing when you query using the same structure is that you get the same structure back.
Difference Between GraphQL and REST
REST and GraphQL differ on certain aspects. With REST, the server decides the fields for which you query. It offers a number of round trips before you get the result. There are two options that REST provides. First is to query the broader data first, and second is to query the more specific information about it afterwards. With GraphQL, however, you get to decide the data you want and then get it in the same structure.
Interesting Facts About GraphQL