Skip to content

provide request metadata #400

Open
Open
@chaoky

Description

@chaoky

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions