Open
Description
The delete mutations aren't available in the Update patch relation, even though there is a top-level delete mutation available for the relation.
Available nested mutations:
connectByCurrencyIdAndCountryId: [CurrencyCountryCurrencyCountryPkeyConnect!]
connectByNodeId: [CurrencyCountryNodeIdConnect!]
updateByCurrencyIdAndCountryId: [CurrencyCountryOnCurrencyCountryForCurrencyCountryCountryIdFkeyUsingCurrencyCountryPkeyUpdate!]
updateByNodeId: [CountryOnCurrencyCountryForCurrencyCountryCountryIdFkeyNodeIdUpdate!]
create: [CurrencyCountryCountryIdFkeyCurrencyCountryCreateInput!]
Available root delete mutation:
Mutation.deleteCurrencyCountry
The table schema:
create table if not exists pivot.currency_country (
currency_id uuid references public.currency(id) on delete cascade,
country_id uuid references public.country(id) on delete cascade,
primary key (currency_id, country_id)
);
comment on table pivot.currency_country is E'@omit all';
comment on constraint currency_country_currency_id_fkey on pivot.currency_country is E'@fieldName currency\n@foreignFieldName countries';
comment on constraint currency_country_country_id_fkey on pivot.currency_country is E'@fieldName country\n@foreignFieldName currencies';
alter table pivot.currency_country enable row level security;
revoke all on table pivot.currency_country from anonymous, member;
grant select on table pivot.currency_country to anonymous, member;
revoke all on table pivot.currency_country from admin;
grant all on table pivot.currency_country to admin;
drop policy if exists pivot_currency_country_select on pivot.currency_country;
create policy pivot_currency_country_select on pivot.currency_country for select
using (true);
drop policy if exists pivot_currency_country_all on pivot.currency_country;
create policy pivot_currency_country_all on pivot.currency_country for all
using (util.is_admin());
The above should give admin users permissions to not only create but also delete relations.
Metadata
Metadata
Assignees
Labels
No labels
Activity