graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

Add the ability to set Deferrable/Deferred from console.

Open abdullah2993 opened this issue 4 years ago • 1 comments

The equivalent in pgAdmin is these two checks

image

right now we have to go and manually edit the generated migration to add DEFERRABLE INITIALLY DEFERRED.

Example Migration:

ALTER TABLE public.xxx
    ADD CONSTRAINT xxx_id_fkey FOREIGN KEY (y_id)
    REFERENCES public.yyy (id) MATCH SIMPLE
    ON UPDATE NO ACTION
    ON DELETE NO ACTION
    DEFERRABLE INITIALLY DEFERRED;

abdullah2993 avatar Aug 23 '21 16:08 abdullah2993

I think another good usecase for @defer could be when a model has a computed field that takes a while to formulate.

Thanks for consideration :)

LydiaF avatar Sep 15 '22 19:09 LydiaF