Posts

Showing posts from January, 2026

Build a GraphQL API with Synthetic GraphQL in Azure APIM!

Image
We've already nailed PassThrough GraphQL in APIM ๐Ÿš€( https://tech-sakshimittal.blogspot.com/ ). Now, let's dive into Synthetic GraphQL๐Ÿ’ช Why Synthetic GraphQL? ๐Ÿค” It's perfect when you want to: - Aggregate data from multiple sources (REST APIs, Azure SQL, Azure CosmosDB) - Simplify complex backend interactions - Give clients flexible query power ๐Ÿ˜Ž - Transform or shape existing REST APIs without changing them - Expose a more query-friendly interface to clients ๐Ÿ‘‰  Data Sources In this demo, we've set up 3 data sources whose responses will be mapped to GraphQL schema fields. 1. Azure SQL 2. REST API 3. Azure CosmosDB  ๐Ÿ‘‰ DataSource1: Azure SQL [dbo].[bookInfo] In Azure SQL database, a table is created ' [dbo].[bookInfo]'. Here is the data: ๐Ÿ‘‰  DataSource 2: BookStore REST API        These are the REST API endpoints we'll connect to GraphQL via APIM . GET /books → Fetch all books ๐Ÿ“š(list of all books)        This endpoint returns...

Exposing GraphQL APIs Securely with Azure APIM: A Step-by-Step Guide๐Ÿš€

Image
  Are you looking to expose GraphQL APIs securely? Azure API Management (APIM) provides robust support for GraphQL, making it easier to manage and secure your APIs.   In APIM, there are 2 options available to expose GraphQL api.         Pass-Through GraphQL: Proxy an existing GraphQL service (hides original service details)          Synthetic GraphQL: Build a GraphQL API on top of REST APIs/other services This article covers Pass-Through GraphQL. Step 1: Create a GraphQL API in APIM - Azure portal > APIM > APIs > + Add API > GraphQL Step 2: Import GraphQL Schema              Provide GraphQL endpoint, API URL suffix, display name             APIM auto-fetches schema (if endpoint is accessible). If it does not do auto fetches, choose to import a schema file(*.graphql). Click on Create button.  Please Note: In case of endpoint. If a...