-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLSchema - Error: "contains" operator on scalar field is not allowed in auth filter #2581
Comments
Hey👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂 |
@kekami Can you share the SQL table definitions for User and Worker, as well as the generated source schema.sql.ts? It's hard to pinpoint what the problem might be without a bit more detail. |
Hey @palpatim Managed to create a smaller reproducible example of this one as well. Table definitions
schema.sql.ts
resource.ts
Also, worth mentioning, I noticed that the error only occurs when using userpool auth, but works fine with IAM auth. |
The database is hosted on https://neon.tech/, not using AWS RDS if relevant. |
Thanks for the repro, @kekami.
Either way, we'll try digging into it locally. |
Hi @palpatim
|
I suspect it has to do with
|
@palpatim Dug a little and found the reason, in the VTL for Connection Queries e.g.
The problem is here:
These should be:
Not quite sure why they aren't being set though. |
use non-mapped table name to generate array/non-scalar fields on relational queries ✅ Closes: aws-amplify#2581
use non-mapped table name to generate array/non-scalar fields on relational queries ✅ Closes: #2581
This issue is now closed. Comments on closed issues are hard for our team to see. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Environment information
Description
Getting the following error when querying a nested object.
Query:
Schema:
The text was updated successfully, but these errors were encountered: