Graphql-engine: cascade as a query parameter in delete mutation

Created on 12 Mar 2019  路  4Comments  路  Source: hasura/graphql-engine

I would like to specify a parameter called cascade:true in my delete mutation which will delete all related rows in other tables.

There's one way to specify this by configuring ON DELETE cascade constraint. (#225)

But it would be nice to have this as a parameter in my graphql mutation, if i have not setup those constraints in postgres.

server ideas

Most helpful comment

@0x777 Don't worry, I found it -
image

All 4 comments

I love this idea. It can be very useful :wink:

This is not easy to do (if it is possible at all). The dependency tree computation and its traversal are best left to Postgres with the cascade option in the foreign key constraint.

@0x777 is the cascade option something you can set?

@0x777 Don't worry, I found it -
image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hooopo picture hooopo  路  3Comments

stereobooster picture stereobooster  路  3Comments

codepunkt picture codepunkt  路  3Comments

jjangga0214 picture jjangga0214  路  3Comments

EmrysMyrddin picture EmrysMyrddin  路  3Comments