cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mradul_K
Microsoft
Microsoft

Consuming GraphQL based API in PowerApps

I want to consume my web API build using GraphQL query language in my Canvas based power app. How to register such API under custom connections and how to consume this connection in canvas app to execute queries?

Thanks

2 REPLIES 2
ChrisPiasecki
Super User
Super User

Hi Mradul_K,

 

To consume a custom API, this requires registering a custom connector. Please note though that only REST APIs can be consumed by Power Apps and Power Automate (Logic Apps can also consume WCF endpoints). The canvas app relies on the swagger/open API definition of the REST endpoint to determine the schema of the response object so that you can map fields to controls on the canvas. Unless your graphql is behind a REST API, you won't be able to consume it directly within Power Apps. 

ashiqf
MVP

I know it is an old post but it might help some one looking for an answer. If you want to use a GraphQL query based API in Power Apps, you can either register a Custom Connector calling the graphql api or call a flow which call the API through the HTTP connector. To call a graphql api, you will have to convert the GraphQL query to raw body, Postman utility will help you do this.

GraphQL-Postman-RawRequestBody-Code.png

I have written about this on the following blogpost how you can do this

https://ashiqf.com/2021/04/25/what-is-graphql-and-how-to-consume-a-graphql-query-based-api-in-power-...

 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (4,483)