UPDATED 09:00 EDT / OCTOBER 09 2024

INFRA

Apollo bridges the gap between GraphQL and REST APIs

Apollo GraphQL Inc., a provider of tools and services for working with the GraphQL open-source data query language, today announced a set of connectors that bridge the gap between GraphQL and representational state transfer application programming interfaces, which are widely used to build web services that allow communication between services and applications.

Developed by Facebook in 2012, GraphQL allows client services to request precisely the data they need from a server, making it more efficient and flexible compared with REST APIs. Though REST is ubiquitous in microservices architectures, it’s an older standard that supports less precision in requests. That often results in queries retrieving more data than necessary or not enough data, requiring multiple requests.

In contrast, a GraphQL client can specify exactly the data needed in a single request and can request data from multiple related resources, making it faster and more efficient than REST.

Apollo GraphQL said the introduction of Apollo Connectors significantly reduces the need to write redundant resolver code when working with the REST APIs. They allow developers to declaratively expose REST APIs through a federated GraphQL schema. An organization’s REST APIs can be combined into a unified graph, reducing integration complexity.

Making REST better

“GraphQL makes REST APIs better,” said Apollo GraphQL Chief Technology Officer Matt DeBergalis. “We see it as sitting above REST APIs but not replacing them. The technologies that win are those that are incrementally adoptable.”

REST APIs are ubiquitous on the Internet and will be used long in the future, DeBergalis said. “There are REST APIs for adding items to your shopping cart, for estimating shipping times, dynamic pricing, real-time inventory, product recommendations, and user-generated reviews,” he said. “Those APIs are your business capabilities wrapped up into an interface. Connectors allow us to come into a large organization and transform their API platform so that they can ship more quickly and support more kinds of experiences.”

GraphQL sits between APIs and applications. That has meant that developers have historically had to write code called a graph server to connect APIs across an organization. “While GraphQL has an incredible developer experience and is a delight to work with, developers have had to go through a fairly involved technical process to get to the point where they’re able to take advantage of it,” DeBergalis said. “Connectors gets rid of that. They makes it a five-minute exercise to add a new API to a graph that you already have.”

Developers can use a simple declarative syntax within their GraphQL schema to connect directly to REST API endpoints and streamline the process of mapping types and fields to underlying services. Connectors reduce technical debt and drudgery.

“You can use Apollo Connectors and an artificial intelligence chatbot we’ve built without writing code,” DeBergalis said. “It understands how to call everything the right way and taps into the excitement around AI.”

GraphOS enhancements

Apollo GraphOS, which provides the infrastructure and workflows to unify and deliver APIs with a federated GraphQL platform, provides standardized tooling and a smart editor for Visual Studio Code, which has extensions and tooling that help with writing and consuming GraphQL schemas.

Apollo is also enhancing GraphOS with a new native query planner that it said delivers significant performance improvement, reduces resource usage and makes requests more efficient. The company is also introducing entity caching with cache invalidation in public preview. That allows developers to store business entities such as inventory and user records in a Redis database management system for long-term caching.

New workflow improvements in the Rover command line interface integrate it more closely with GraphOS Studio, which is the primary web interface for GraphOS. Additional under-the-hood improvements make processing of large-scale graphs up to 10 times faster. Rover now also supports subgraph mirroring, an automated workflow that allows developers to easily fetch and test subgraph configurations on their local machines.

Photo: Pixabay

A message from John Furrier, co-founder of SiliconANGLE:

Your vote of support is important to us and it helps us keep the content FREE.

One click below supports our mission to provide free, deep, and relevant content.  

Join our community on YouTube

Join the community that includes more than 15,000 #CubeAlumni experts, including Amazon.com CEO Andy Jassy, Dell Technologies founder and CEO Michael Dell, Intel CEO Pat Gelsinger, and many more luminaries and experts.

“TheCUBE is an important partner to the industry. You guys really are a part of our events and we really appreciate you coming and I know people appreciate the content you create as well” – Andy Jassy

THANK YOU