Open revskill10 opened 5 years ago
I think the docs answer your question indirectly. Read the section on many-to-many relationships. Specifically, I think you could address this using a SQL View: https://docs.hasura.io/1.0/graphql/manual/schema/relationships/database-modelling/many-to-many.html#flattening-a-many-to-many-relationship-query
@thefliik If i am not wrong, introducing another view might not be optimal solution, as this could be automatic manipulated by Hasura, just like aggregated fields.
Would love to see some kind of support for this too, as stated on the docs there, modelling many to many relationships through a view will abandon your permissions in your original table, which even Hasura recommends not to do.
Having the ability to define your relationships like described above, or in a similar way, could fix the resolving of a join table, without the need to flatten manually and losing your permissions state on the original table.
Have there been any updates on this?
In Rails and ActiveRecord, we could have the following relationships:
As we see, between two tables, there're many kinds of
array_relationship
could be created, using awhere
clause.Is this feature possible with Hasura ?