54: Does your API Spark Joy — Learn decluttering with GraphQL

Calling APIs to retrieve data can be a difficult and messy process. Our two guests, Mark Stuart and Shruti Kapoor, are both engineers at PayPal who use GraphQL to bring order to their APIs and data.What is GraphQLGraphQL is a query language for your API, but as Shruti says, “A common myth people have about GraphQL is that we’re querying the database. But we’re not; we’re querying the API.” She adds, “GraphQL provides a way to call your API and get the data that you need.” Mark adds his own definition. “GraphQL is a query language that’s used to grab data and as a way to tell the backend system to change things, such as mutating operations. It also hides the mess of your APIs by putting almost a facade in front of it.” GraphQL as an orchestration layerShruti says another way they use GraphQL at PayPal is as an orchestration layer. She explains this more in-depth: “Let's say you've got five different rest APIs, and now you want to combine them under GraphQL. So what you want is that your client should only see GraphQL APIs. But behind the scenes, you've got like this dirty table of all these REST APIs, which send you so much data, so you want to clean that up, right? So you put a nice tablecloth on it. That tablecloth is a GraphQL orchestration layer.”How GraphQL combines with ApolloThe Apollo Graph Platform is one of the most popular tools to combine with GraphQL, with additional resources and documentation to help out. Shruti sums up Apollo’s uses for us: “They have Apollo Client for consuming GraphQL API on the client-side, and then they have Apollo server for building a GraphQL API on the server-side.” Apollo includes tools for consistent error handling, different hooks, as well as enterprise-level tools. Mark can attest to its usefulness. “At PayPal, we had a lot of duplication, a lot of graphs,” Mark says. “Apollo has some really cool tools to help merge all of that.” Try Apollo and GraphQL to declutter your APIs.Platform.shLearn more about us.Get started with a free trial.Have a question? Get in touch!Platform.sh on social mediaTwitter @platformshTwitter (France): @platformsh_frLinkedIn: Platform.shLinkedIn (France): Platform.shFacebook: Platform.shWatch, listen, subscribe to the Platform.sh Deploy Friday podcast:YouTubeApple PodcastsBuzzsproutPlatform.sh is a robust, reliable hosting platform that gives development teams the tools to build and scale applications efficiently. Whether you run one or one thousand websites, you can focus on creating features and functionality with your favorite tech stack.

Om Podcasten

Meet the people behind technology, learn about the open source projects you need to know about, get updates on community events, and deep dives into social causes on the web.Come deploy with us on a Friday and deep dive into the latest news and information about the constantly evolving ecosystem - where people are working, what’s left to be solved, how to get started, and where you can help.