-
Notifications
You must be signed in to change notification settings - Fork 2.8k
insert mutations can now handle nested-data/relationsips (close #343) #429
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
Conversation
|
Review app available at: https://hge-ci-pull-429.herokuapp.com |
|
Review app available at: https://hge-ci-pull-429.herokuapp.com |
|
Review app available at: https://hge-ci-pull-429.herokuapp.com |
| G.NamedType $ qualTableToName tn <> "_insert_input" | ||
|
|
||
| -- table_relname_obj_insert_input | ||
| mkObjInsInpTy :: QualifiedTable -> RelName -> G.NamedType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These types don't need to be generated per (table, rel). They can be as follows:
input table_insert_input {
..
}
input table_obj_rel_insert_input {
data table_insert_input!
on_conflict table_on_conflict!
}
input table_arr_rel_insert_input {
data [table_insert_input!]!
on_conflict table_on_conflict!
}|
Review app available at: https://hge-ci-pull-429.herokuapp.com |
1 similar comment
|
Review app available at: https://hge-ci-pull-429.herokuapp.com |
|
Review app available at: https://hge-ci-pull-429.herokuapp.com |
|
Review app available at: https://hge-ci-pull-429.herokuapp.com |
-> if no relations given, insert all objects at one go -> if no array relations to insert, generate with expression as normal insert, else insert object and generate with expression as select from table using array relation left cols values in where expression
|
Review app available at: https://hge-ci-pull-429.herokuapp.com |
|
Review app available at: https://hge-ci-pull-429.herokuapp.com |
|
Review app available at: https://hge-ci-pull-429.herokuapp.com |
|
Review app available at: https://hge-ci-pull-429.herokuapp.com |
Resolve Conflicts: server/src-lib/Hasura/RQL/DML/Select.hs server/src-lib/Hasura/RQL/Types.hs server/src-lib/Hasura/SQL/DML.hs
|
Review app available at: https://hge-ci-pull-429.herokuapp.com |
|
Review app available at: https://hge-ci-pull-429.herokuapp.com |
|
Review app available at: https://hge-ci-pull-429.herokuapp.com |
|
Review app https://hge-ci-pull-429.herokuapp.com is deleted |
V3_GIT_ORIGIN_REV_ID: b0377caff0cb6c65b51179037e09e6eae9dc3bfb
examples:
Insert author along with it's articles (inserting array relationship)
Insert articles along with author (inserting object relationship)