I have a PowerApps canvas app with a screen containing a grid where users can do two things to each item: update the status of the item or mark the item as resolved. Each row on the grid has a "save updated status" and "resolve" icon. When clicked, they don't leave the page. Each icon makes an API call using our custom connector. (We're not using a Flow.) Because they're not leaving the page, I would like to use the Notify() function to show that the API accepted the status update or the resolved item. How can I display this to the user with the API's successful response?
Solved! Go to Solution.
@aec2018 I'll admit, haven't used GraphQL, but Google says for the error handling in GraphQL, when an error occurs, the server must add an "error" entry in the response.
So you can see if that's returned for you. If nothing else,as you said, you could always infer from the info that's received. Sorry I couldn't be more helpful.
@aec2018 when you created the custom api connector, you were given the option to specify the response and the response body. With the intellisense in PowerApps you can set the notify value to the response returned.
For reference:
https://docs.microsoft.com/en-us/connectors/custom-connectors/define-blank
hope that helps
@jatcube I appreciate the help. A few questions, though. Our API is GraphQL based so all of our requests are POST. I use the default response value in the custom connector to define the shape of the data that we'll get back when retrieving data to display. When submitting a mutation, GraphQL responds with the item that was updated/saved. So I wouldn't have a property explicitly saying that a response was successful. I would only have access to the body, correct? Not the HTTP header with the response code? And if so, I'm guessing that I would then have to use some logic to infer a success? Such as just looking for the ID in the update response that was used in the update request?
@aec2018 I'll admit, haven't used GraphQL, but Google says for the error handling in GraphQL, when an error occurs, the server must add an "error" entry in the response.
So you can see if that's returned for you. If nothing else,as you said, you could always infer from the info that's received. Sorry I couldn't be more helpful.