Add extra header to the call for Amplify API (GraphQL)
Hello guys,
At the moment we're using some of the services provided by Amplify. Looking good at the moment except one specific case:
- we need to add one extra header to the Amplify API (graphQL) calls and I don't see an easy way to do it.
Could you please advice some solution on it?
The awsAPIPlugin authorizationType is API_KEY.
Hello @AndreyGuitar - Thank you for opening the issue. This is not a feature that is currently supported within amplify-flutter. I have marked this as a feature request to track interest.
I will link the iOS and Android documentation for this capability since it would likely be implemented in a similar way in amplify-flutter.
- iOS: https://docs.amplify.aws/lib/graphqlapi/advanced-workflows/q/platform/ios#adding-headers-to-outgoing-requests
- Android: https://docs.amplify.aws/lib/graphqlapi/advanced-workflows/q/platform/android#adding-headers-to-outgoing-requests
Created a feature ticket to track this: https://github.com/aws-amplify/amplify-flutter/issues/798