Reading Time: 6 minutes

In June 2021, MuleSoft announced the first GA release of DataGraph as an addition to Anypoint Platform. DataGraph allows customers to innovate faster by consuming data from multiple APIs in a single request. 

In this article, we will provide a brief overview of DataGraph and discuss how it differs from GraphQL.

What is GraphQL?

GraphQL was started by Facebook due to the challenges it was facing with highly interconnected data. News stories, in particular, were especially challenging because a user cannot just retrieve the news article, who wrote it, and other information about it. Instead, there are a lot of data interdependencies with other parts of the Facebook ecosystem that are not easily accessible using traditional REST API approaches. 

Therefore, when Facebook rewrote their News API to support a complete rewrite of the mobile application, they decided that a new approach to data retrieval would be required — GraphQL was the result.

Since it’s initial development in 2012, it has been released in 2015 to the open source community via the GraphQL Foundation (which is hosted by the non-profit Linux Foundation). Enhancements to the language specification have also occurred over the years with the most recent change being the incorporation of the GraphQL Schema Definition Language (SDL) being incorporated into the specification in 2018.

GraphQL allows developers to retrieve data from many possible sources in a single call in such a way that the results are predictable and are strongly typed, meaning that the caller will know exactly what types of data will be returned.

Why did MuleSoft create DataGraph?

GraphQL is a very potent query system, so why did MuleSoft feel the need to develop DataGraph? Before we can answer that, let’s examine what DataGraph is and isn’t in the first place.

Anypoint DataGraph is not a replacement for GraphQL. Instead, DataGraph is meant to enhance how GraphQL is incorporated into the SDLC by tightly integrating the user experience with other parts of Anypoint Platform. More specifically, DataGraph is meant to be an easy-to-use GUI for defining the relationships between multiple data sources.

latest report
Learn why we are the Leaders in API management and iPaaS

Does DataGraph replace API-led design?

Absolutely not! Instead, DataGraph is intended to work with your existing System and Process APIs. Without DataGraph, when a MuleSoft developer needs to retrieve related data from multiple systems they have to execute multiple API invocations and manually merge the data based on foreign key relationships between the various data sets. And although this is more easily done in the Dataweave language, it can be simplified even further using GraphQL. 

DataGraph lets you define a unified schema (a data description that spans multiple data sources) in a graphical manner using assets already published in Exchange, removing the need to manually do this activity. This allows you to spend more time innovating when developing new applications.

In spite of this, DataGraph doesn’t eliminate the need to write MuleSoft APIs. Although GraphQL is great for combining data from multiple sources, you still need to understand how to connect to those systems in order to retrieve the data sets that will eventually be combined. Anypoint Platform’s integration capabilities are well suited for this task. Additionally, APIs with complex transformations will still require that a new MuleSoft API be created to fulfill this need versus simply retrieving data from multiple existing MuleSoft APIs using DataGraph.

Want to learn more?

Read our introduction to GraphQL to get a better understanding of this innovative technology. When you’ve done that, watch a demo of DataGraph to see how this can allow you to further compress the SDLC, resulting in accelerated delivery of your strategic initiatives over time.