appsync-resolvers icon indicating copy to clipboard operation
appsync-resolvers copied to clipboard

Make context object available to resolver func

Open asterikx opened this issue 5 years ago • 1 comments

Currently, resolver functions are invoked only with the GraphQL arguments or the resolved field. The identity field or any other (possibly user-defined) field of the $context object is dropped.

https://github.com/sbstjn/appsync-resolvers/blob/08cb572f11cd9cf4088e0af5f1e005c2bf3d58ed/repository.go#L27

This makes it impossible to perform resource-based authorization based on $context.indentity.username or $context.identity.cognitoIdentityId (see AWS AppSync Developer Guide) in Lambda resolvers.

asterikx avatar Jul 26 '20 16:07 asterikx

Hi @asterikx , try to use the Kovel forked which have resolved this. Here is the link https://github.com/kovel/appsync-resolvers

gusdecool avatar Apr 09 '23 01:04 gusdecool