{"componentChunkName":"component---src-templates-modal-page-js","path":"/building-apis-with-ruby-on-rails-and-graphql","result":{"pageContext":{"node":{"slug":{"current":"building-apis-with-ruby-on-rails-and-graphql"},"name":"Building APIs with Ruby on Rails and GraphQL","githubUrl":null,"description":"Learn how to build a GraphQL server for Ruby on Rails with GraphQL-Ruby","developer":null,"price":"Free","url":"https://www.sitepoint.com/building-apis-ruby-rails-graphql/","tags":[{"id":"eb64bb48-8f17-5bf6-9fd3-64803611a4c7","name":"Ruby","slug":{"current":"ruby"}}],"logo":{"asset":{"url":"https://cdn.sanity.io/images/g5bd2nk6/production/42cf02fe9c5b7a35e91b36f7861eb1a66206f389-1880x1424.png"}},"categories":[],"_rawContent":[{"_key":"8170757be26f","_type":"block","children":[{"_key":"8170757be26f0","_type":"span","marks":[],"text":"Designing APIs for mobile and web applications has become a very common problem today. Since the burst of smartphones a decade ago (and with them, the explosion of mobile apps) REST APIs have become the main standard to exchange data between application server and clients."}],"markDefs":[],"style":"normal"},{"_key":"4432b467856f","_type":"block","children":[{"_key":"4432b467856f0","_type":"span","marks":[],"text":"One of the biggest issues encountered when developing an API is the structure and granularity of the data your backend is giving back to your client. Let’s say you’re building a Twitter-like social network where users can follow other users. While designing your API, you might want to add an endpoint (GET /users/123) to retrieve data about a specific user. Should the server send data about this user’s followers in the API response? Or should it keep the response very light because what you need is only basic data about this one user? What if your client needs the full data of this user, but only the username and profile pictures of his followers?"}],"markDefs":[],"style":"normal"},{"_key":"80e464d67b87","_type":"block","children":[{"_key":"80e464d67b870","_type":"span","marks":[],"text":""},{"_key":"80e464d67b871","_type":"span","marks":["ed4fb08f7823"],"text":"Read more"},{"_key":"80e464d67b872","_type":"span","marks":[],"text":""}],"markDefs":[{"_key":"ed4fb08f7823","_type":"link","blank":true,"href":"https://www.sitepoint.com/building-apis-ruby-rails-graphql/"}],"style":"normal"}]},"targetPath":"","modalType":"tool"}},"staticQueryHashes":[]}