Find answers to commonly asked Fabric API for GraphQL questions.
What is GraphQL?
GraphQL is a query language for APIs that lets apps request exactly the data they need. It uses a strong type system to clearly describe available data, reduces over-fetching by allowing precise requests, makes API updates easier without breaking existing code, and enables the use of a broad set of developer tools. It's a more efficient way for applications to communicate with servers and databases.
What is Microsoft Fabric API for GraphQL?
Microsoft Fabric API for GraphQL is a managed service that enables you to create a GraphQL API in seconds to access data from your data sources such as Microsoft Fabric Data Warehouses, Microsoft Fabric Lakehouses, Microsoft Fabric Mirrored Databases, Microsoft Fabric SQL Databases, and Azure SQL Databases. It provides a unified API layer for querying and mutating data from these supported data sources.
What GraphQL operations are supported in Fabric API for GraphQL?
Only GraphQL queries (read) and mutations (write) are supported currently. Data sources exposed via SQL Analytics Endpoints are read-only thus only supporting Queries. In the case of Data Warehouses, a primary key needs to be defined for Mutations to be automatically generated.
How can I view and edit resolvers in Fabric API for GraphQL?
Resolvers are GraphQL components that provide the business logic to resolve fields in the API and perform operations with data residing in the data sources. Fabric automatically generates resolvers whenever you attach a new data source or select new objects to be exposed from an existing data source. Currently, it's not possible to customize resolvers. For customized business logic in API for GraphQL, you can create a stored procedure in the data source and expose it in the GraphQL API.
Does the API for GraphQL client application require access to the data source in order to perform queries or mutations?
API for GraphQL requires applications to use Microsoft Entra ID for authentication. Your client application must be registered and configured adequately to execute API calls against Fabric. The app registered in Microsoft Entra requires GraphQLApi.Execute.All permissions for the Power BI service. For more information, see Create a Microsoft Entra app in Azure. In addition to Microsoft Entra, if the API is configured to use single sign-on (SSO), the authenticated user or service principal in the app calling the GraphQL API requires access to both the GraphQL API and the data source. More specifically Run Queries and Mutations permission in the GraphQL API and read or write access required in the data source of choice accordingly. Another option is to have the user or service principal as a workspace member with a contributor role where both the API and data source items are located, which gives the required access to both items from a single place. For more information, see Give users access to workspaces. Alternatively, if the API is configured to use saved credentials, the authenticated user or service principal just needs to have access to the API (Select Run Queries and Mutations option when adding direct access permissions to the API). You can find an end-to-end example with sample code for both user principals and service principals at Connect Applications.
How do I open a support ticket for API for GraphQL?
To get help from Microsoft Support on any issue related to Fabric API for GraphQL, visit our Fabric Support site and choose the Data Engineering option.
Which regions aren't yet supported by the API for GraphQL?
API for GraphQL is currently not supported in the West US 3 region.
Does API for GraphQL support Private Link?
API for GraphQL doesn't support Private Link at this time. However, we're planning to support this feature in the future and will provide updates as they become available.
I enabled Private Link for my Fabric tenant. Why are my GraphQL items not working?
If the tenant setting "Block public internet access" is enabled (that is, public access is disabled), any nonsupported artifacts or items are automatically disabled, including API for GraphQL. This means that previously created items can't be accessed, nor can new ones be created. The only way to access these items is to allow public access.
Why does my request perform poorly the first time I issue it, then perform well on subsequent requests?
There are two main reasons for this behavior. First, the first request might take longer if a data source needs to be warmed up if it's cold. Even if the data source isn't cold, data retrieval might not be as efficient the first time GraphQL issues a query, if the data source doesn't have the necessary data loaded in memory. The second reason is that the first request to an API for GraphQL endpoint might take longer because the system needs to load your schema and configuration to be ready to accept requests. This is a one-time cost, and subsequent requests are faster because the system is already warmed up and ready to serve your requests.
How can I provide feedback or suggestions for API for GraphQL?
We welcome your feedback and suggestions! You can provide feedback through Fabric Ideas. Our team actively monitors the feedback and suggestions submitted through this platform. You can also reach out to us via Microsoft Fabric Support for any specific queries or concerns.