Microsoft Fabric’s API for GraphQL: best practices for performance
Microsoft Fabric’s API for GraphQL offers a powerful way to query data efficiently, but performance optimization is key to ensuring smooth and scalable applications. In this blog, we’ll explore best practices to maximize the efficiency of your Fabric’s API for GraphQL. Whether you’re handling complex queries or optimizing response times, these strategies will help you get the best performance out of your GraphQL implementation.
Region
Cross-region calls are generally causing higher latencies, in order to achieve the best performance, it is recommended to have your tenant region, capacity region and client physical location in the same region.
Follow the steps to verify your region-related information:
Tenant region
- Go to the Microsoft Fabric portal with an admin account and click on the highlighted icons to get the tenant region information.

Capacity region
- Go to Microsoft Fabric portal, open the workspace which hosts your Fabric’s API for GraphQL.
- Go to license information.

Data source region
- If your data source is hosted on Fabric platform, the workspace’s capacity region would be the data source region.
- If your data source is outside Fabric platform, example like Azure SQL DB, you should be able to find the regional information from the original data source provider.
Performance testing
For customers evaluating the performance, we recommend adhering to the following guidelines to ensure accurate and reliable results.
Client-side tools
To emulate the closet behavior to your actual application, it is recommended to use scripts or demo web applications to perform the testing to measure the performance, also utilize http connection pooling can greatly reduce the latencies especially for cross-region scenarios.
We have a sample performance test script that can help you get started quickly.
Related topics
Data Collection & Evaluation
It is advisable to automate request execution over a defined time period using scripts or performance testing tools. Analyzing the average or percentile-based results will help ensure more accurate and unbiased performance measurements.
Common issues
Here is list of common issues that can impact latency and performance.
- Your client geo-location is different from your tenant and capacity region.
- As mentioned in our best practices, if you intend to score the best performance for your application, having them in the same region would achieve the goal.
- Query the API for GraphQL for the 1st time.
- API for GraphQL has internal caching mechanisms to help reduce latencies for continuous calls, however you might face latency spikes for the initial calls.
- Besides the API, certain data sources are known to undergo a warm-up phase, which will result in higher latencies for initial requests. When querying such data sources through the API, similar performance challenges may be encountered.
- Data source and fabric capacity related setup.
- You can think of API for GraphQL as a wrapper on top of your data sources. If your data source itself has performance issues due to the nature of its complexity, it is expected that API latencies can be high. When such cases happen, it is recommended to test querying your data sources directly for a more effective performance comparison with that of API for GraphQL.
- Follow this guide regarding how to choose a suitable data store for your business needs: Fabric decision guide – choose a data store
- When utilizing API for GraphQL, performance is going to be bound by the Fabric capacity SKU you have selected.
- Refer to this general guidance about Fabric capacity SKU and its compute power: Microsoft Fabric concepts
- You can think of API for GraphQL as a wrapper on top of your data sources. If your data source itself has performance issues due to the nature of its complexity, it is expected that API latencies can be high. When such cases happen, it is recommended to test querying your data sources directly for a more effective performance comparison with that of API for GraphQL.
Conclusion
Several factors can impact the performance of your API for GraphQL. Understanding your data source setup, selecting the right regions, and effectively measuring performance are crucial for optimization. We will continue updating this blog with the latest recommendations to help you achieve the best possible performance for your Microsoft Fabric API for GraphQL.
Refer to our public documentation to learn more: Microsoft Fabric API for GraphQL overview