amplify-flutter icon indicating copy to clipboard operation
amplify-flutter copied to clipboard

Add extra header to the call for Amplify API (GraphQL)

Open AndyGUI opened this issue 5 years ago • 2 comments

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.

AndyGUI avatar Jun 24 '21 11:06 AndyGUI

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

Jordan-Nelson avatar Jun 24 '21 19:06 Jordan-Nelson

Created a feature ticket to track this: https://github.com/aws-amplify/amplify-flutter/issues/798

dnys1 avatar Aug 11 '21 22:08 dnys1