DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • What Is GraphQL?
  • Projections/DTOs in Spring Data R2DBC
  • JQueue: A Library to Implement the Outbox Pattern
  • 2-Tier Architecture vs 3-Tier Architecture in DBMS

Trending

  • GitHub Copilot's New AI Coding Agent Saves Developers Time – And Requires Their Oversight
  • Beyond Simple Responses: Building Truly Conversational LLM Chatbots
  • Unlocking Data with Language: Real-World Applications of Text-to-SQL Interfaces
  • Dropwizard vs. Micronaut: Unpacking the Best Framework for Microservices
  1. DZone
  2. Data Engineering
  3. Databases
  4. Unleash the power of Anypoint DataGraph

Unleash the power of Anypoint DataGraph

With Anypoint DataGraph, you can reuse multiple APIs in a single request. Enterprise architects can easily unify APIs into one data service all without writing more code. Developers can consume multiple APIs from the data service in a single GraphQL request.

By 
Jitendra Bafna user avatar
Jitendra Bafna
DZone Core CORE ·
Updated Aug. 21, 21 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
24.8K Views

Join the DZone community and get the full member experience.

Join For Free

In this blog, we will be learn about how to unify multiple APIs into single data service with Anypoint DataGraph. Before we start with Anypoint DataGraph, we need to understand the GraphQL and Anypoint DataGraph is the layer built on the top of GraphQL.

GraphQL is an open-source query language for Rest API's and it is developed by Facebook in 2012 before releasing publicly in 2015. GraphQL allows you to send the query to your API and get the required data. 

REST APIs are powerful and follow a resource-oriented and well-structured approach. However, when the data is complex and it is not possible to fetch all the data within a single request as it involved various operations and routes get more complex. GraphQL is very useful in such cases and structures data in the form of a graph with its powerful query syntax for traversing, retrieving, and modifying data. 

GraphQL is capable of aggregating the data, returns predictable data to the clients.

Anypoint DataGraph

Anypoint DataGraph is component of Anypoint Platform which allows you to unify the multiple APIs into single data service.

With Anypoint DataGraph, you can reuse multiple APIs in a single request. Enterprise architects can easily unify APIs into one data service — all without writing more code. Developers can consume multiple APIs from the data service in a single GraphQL request.

Advantages of Anypoint DataGraph

  • Unify the multiple APIs into the single data service. With Anypoint DataGraph, you can serve data from multiple underlying APIs within single request without writing any code.
  • Consume the data from multiple APIs using single request.
  • Developer doesn't have to write the code to parse the data from multiple APIs.
  • Anypoint DataGraph is managed service, no maintenance or patching for IT. 

Restrictions

Anypoint DataGraph supports:

  • REST APIs with RAML and OAS specifications
  • Only GET methods
  • 250 APIs per unified schema
  • 16,000 fields per unified schema

Anypoint DataGraph restricts downstream REST API calls to:

  • A maximum of 150 concurrent or ongoing calls per unified schema
  • A 5 second timeout per call
  • A maximum of 5 MB of response data per call

Anypoint DataGraph limits the query service to:

  • A 30 second timeout per query
  • A maximum of 100 selected fields per query. 

Authentication Mechanism

DataGraph support below list of Authentication mechanism while calling underlying APIs

  • Basic Authentication
  • Client Id Enforcement via Headers
  • Client Id Enforcement via Query Params
  • Custom (Add Custom headers or Query Params)

Use Case 1

Let's consider the scenario, you have Rest API that returns 10 fields in response but web application requires only 7 fields whereas mobile application requires only 4 fields. In such cases, DataGraph is one of the most optimal options where the client can pass whatever data required as an input request, and DataGraph will return the required fields to the Web Application and Mobile Application. Below is the illustration of Use Case 1.

Use Case 2

Let's consider the scenario where you have to call multiple Rest APIs or want to fetch data from multiple rest API's and each APIs will respond with JSON payload. GraphQL will aggregate all the responses and send back the required data to the client. Below is the illustration of Use Case 2.

Unleash the power of Anypoint DataGraph - Part I


Unleash the power of Anypoint DataGraph - Part II


Unleash the power of Anypoint DataGraph - Part III

Now, you know how to use Anypoint DataGraph and what are different use cases where Anypoint DataGraph can be used.

Data (computing) Database Use case mobile app GraphQL

Opinions expressed by DZone contributors are their own.

Related

  • What Is GraphQL?
  • Projections/DTOs in Spring Data R2DBC
  • JQueue: A Library to Implement the Outbox Pattern
  • 2-Tier Architecture vs 3-Tier Architecture in DBMS

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

OSZAR »