hirochachacha / graphql-assert-transformer

MIT No Attribution
17 stars 4 forks source link

Getting 'ctx.getResource is not a function' error when trying to push to AWS Amplify #14

Open jerocosio opened 2 years ago

jerocosio commented 2 years ago

I followed all the steps on the installation and I wanted to make a quick test with this field:

title: String! @assert(condition: ".length() > 10")

But when I try to push the change to Amplify I'm getting this error:

✖ An error occurred when pushing the resources to the cloud
🛑 An error occurred during the push operation: /
ctx.getResource is not a function

I don't see any transformers generated on the push, so I don't really know where I can look for more information on this error.

Any suggestions?

stewjacks commented 1 year ago

Old issue but for anyone that comes across this: you can't use this with the GraphQL Transformer v2. This is built for v1. https://docs.amplify.aws/cli/migration/transformer-migration/