-
Notifications
You must be signed in to change notification settings - Fork 79
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
How to make manyToMany searchable? #1229
Comments
Hey @mithun35h 👋 thanks for raising this! Unfortunately we will not be able to add type Class
@model
@auth(rules: [{ allow: owner }, { allow: groups, groupsField: "cohorts" }]) {
id: ID!
name: String!
cohorts: [String]
students: [ClassStudent] @hasMany
}
type Student
@model
@auth(rules: [{ allow: owner }, { allow: private, operations: [read] }]) {
id: ID!
name: String!
classes: [ClassStudent] @hasMany
owner: String! @auth(rules: [{ allow: owner, operations: [create, read] }])
}
type ClassStudent
@model
@searchable
@auth(
rules: [{ allow: owner }, { allow: groups, groupsField: "classCohorts" }]
) {
id: ID!
class: Class! @belongsTo
student: Student! @belongsTo
classCohorts: [String] # this will be the cohorts of the class, we need to carry this field onto the join model in order to apply
} |
Hello @josefaidt , I did try out the solution that you have provided here but there was this error To explain my issue better, let me refer it with the same table as your solution. The schema before :
After the changes, the schema looked like this:
So I got the error "EMFILE: too many open files, open" after pushing the latter schema. Tried it several times only to get the same issue at the end. Region Amplify CLI Version OS Node version |
Hi @mithun35h, I've tried to deploy your schema and had to make some minor changes shown below:
With the above schema, I am able to deploy successfully and did not run into the File limit error you've mentioned. |
Hi 👋, We are closing this issue as we have not received any response from you. However, if you are still facing the same issue and require our assistance, please don't hesitate to leave a comment and provide us with the information our team had previously asked for. This way, we can reopen the issue and provide you with better assistance. Thank you! |
Amplify CLI Version
10.7.0
Question
@manytomany(relationName: "name")
create a dynamodb table with the given name, how to make this searchable? or sync it with opensearch
writing post script to create trigger for the table and also create functions in appsync with VTL i think is a complicated customization
The text was updated successfully, but these errors were encountered: