I am making graphql subscription by AWS Appsync and configured OpenID Connect as authentication method. It works fine for mutation and query but doesn't work for subscription.
type Mutation {
requestTransaction(transaction: TransactionRequestInput!): TransactionRequestACK!
@aws_oidc
responseTransaction(transaction: TransactionResponseInput!): TransactionResponse!
@aws_iam @aws_api_key
}
type Subscription {
responseTransaction(id: ID!): Transaction!
@aws_subscribe(mutations: ["responseTransaction"])
@aws_oidc
}
The schema above is the one I am using. Each field has configured a lambda as resolver. I am able to send mutation request to requestTransaction with OIDC jwt token. But when I send subscription request, the resolver is not triggered. The subscription on client side is pending and there is no error. Is there any special configuration required for subscription with OIDC?