Skip to content

Automatically extract inline variables to improve performance #8984

@radekmie

Description

@radekmie

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

We host a public GraphQL API, and some of our end users are completely new to GraphQL. We try to teach them to use variables and call operations reasonably, but some of them are not willing to cooperate.

As a result, for these users, we have 100% APQ misses. If #7130 was implemented, we could disallow such operations. But I realized it would be better to automatically transform their operations using the same logic as the "Extract Variables" in Apollo Explorer. The benefit is obvious: fewer APQ misses means fewer roundtrips, which results in lower overall latency.

Describe the solution you'd like

A new option that'd transform all operations with "Extract Variables".

Describe alternatives you've considered

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