You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed #4299 to create a sql function which returns only a single row. It works great but since the schema still lists the return type as [user!]!, graphql codegen is generating incorrect types.
I created a me query via a sql function of the form:
CREATE OR REPLACE FUNCTION public.me(hasura_session json)
RETURNS "user" LANGUAGE sql STABLE AS
$function$
SELECT
*
FROM
"public"."user" u
where
u.id =(hasura_session ->> 'x-hasura-user-id') :: uuid
$function$