Open
Description
Summary
set the "request.headers" setting to the graphql request headers
Rationale
this functionality is already offered by supabase postgrest and it's very useful for i18n
Examples
create function "public"."_body"("public"."notifications")
returns setof "public"."translations" rows 1
language sql as
$$
select * from "public"."translations"
where id = $1.body_id and
language = current_setting('request.headers', true)::json->>'accept-language'
limit 1
$$;
Alternatives
in hasura, the metadata is injected into computed fields as an argument
Metadata
Metadata
Assignees
Labels
No labels