NolanInteresting, I created a custom query but didn't add any grant execute statements, and it seems to run without errors. Is it just running and returning null?
NolanBy 'run without errors' I mean the client returns 0 errors according to the logs. Haven't looked at the network request yet.
NolanHappy to see RLS making my query logic cleaner, not having to tack on a bunch of
whereclauses based on roles in each and every query.
NolanHaving some trouble porting my first update mutation to postgraphile. https://pastebin.com/hu7virAn That's with
postgraphile:graphql,postgraphile:postgres,postgraphile:postgres:error. Looks like there's no query, and the result of
NolanMy id field is a
uuid, wondering if the parameter in the mutation is off since it's
ID!but nothing else in the stack reports a type mismatch. Happy to provide additional debugging details.
"set-returning functions must appear at top level of FROM",would happen?
this is a more complete error
postgraphile:postgres begin +22s postgraphile:postgres select set_config($1, $2, true), set_config($3, $4, true) +2ms postgraphile:postgres with __local_0__ as ( postgraphile:postgres select to_json(__local_1__.__local_1__) as "value" postgraphile:postgres from unnest("crtrs"."get_notifications_alt"()) as __local_1__ postgraphile:postgres postgraphile:postgres where (TRUE) and (TRUE) postgraphile:postgres postgraphile:postgres postgraphile:postgres postgraphile:postgres ), __local_2__ as (select json_agg(to_json(__local_0__)) as data from __local_0__) select coalesce((select __local_2__.data from __local_2__), ''::json) as "data" +2ms postgraphile:postgres:error error: set-returning functions must appear at top level of FROM
select * from crtrs.get_notifications_alt();on my ide, it works ok
create or replace function admin.event_startdatetime(event admin.event) returns timestamp as $$ select event_start_datetime.event_start_datetime from admin.event left join (select admin.event_date_time.event_id, min(to_timestamp(EXTRACT(EPOCH FROM (min(admin.event_date_time.event_date) || ' ' || min(admin.event_date_time.start_time))::timestamp))::timestamp) over (partition by admin.event_date_time.event_id) as event_start_datetime from admin.event_date_time group by admin.event_date_time.event_id ) as event_start_datetime on event.id = event_start_datetime.event_id; $$ language sql stable security definer; comment on function admin.event_startdatetime(admin.event) is 'Get the start date/time of each event - computed column on admin.events table';