How can I add Lambda Pipeline Resolver to Type with @model
See original GitHub issueI am trying to sanitize the WYSIWYG input from the user with https://www.npmjs.com/package/dompurify.
After doing some reading, I decided to try adding pipeline lambda resolver to existing
type Record @model @searchable @auth(rules: [{allow: groups, groups: ["sys_admin"], operations:[create, update, delete]}])
I found the tutorial on how to add a custom resolver here : https://aws-amplify.github.io/docs/cli-toolchain/graphql?sdk=js#add-a-custom-resolver-that-targets-an-aws-lambda-function
but not sure how this lambda resolver can be used in Type with @model
directive.
This was also asked before here: https://github.com/aws-amplify/amplify-cli/issues/867
if removing @model
directive is the only option, what steps need to be performed in order to keep the same functionalities?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Should we have closed this issue? Or maybe a feature request needs to be created. As I understand the main question of this issue is not resolved yet. It is, to my knowledge, not yet supported to use lambda resolvers on types that are annotated with
@model
.Is this on the planning already?
@monaye I think this is an example for what you were looking for : https://dev.to/aws-builders/direct-lambda-resolvers-with-aws-amplify-and-appsync-2k3j