Skip to content

Ability to configure Response Cache's private_id without a Rhai script #8738

@radekmie

Description

@radekmie

Is your feature request related to a problem? Please describe.

Setting up custom Rhai scripts is not trivial in almost all setups, since it involves an additional volume, etc. Most configuration is done via the YAML file, but the private_id requires a Rhai script to set something on the request's context.

Describe the solution you'd like

For us, the following would be ideal:

response_cache:
  enabled: true
  subgraph:
    all:
      enabled: true
      redis:
        urls: ["redis://..."]
    subgraphs:
      accounts:
        # Based on a header
        private_id:
          header: authorization
        # Based on a JWT field 
        private_id:
          jwt: claim

Describe alternatives you've considered

We could just spend some time to configure the Rhai scripts.

Additional context

None.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions