Skip to content

RFC: Add a way to minify query before sending it #3073

Description

@LoMonacoSalvatore

Summary

I'm trying to send a query to Contentful GraphQL API, which has a query limit of 8Kb.
The query in question is slightly above the limit.
I've tried to minify it by using https://www.npmjs.com/package/graphql-query-compress this package, and by compressing the query string I've managed to get it to around 4Kb.

After feeding the Urql client the query, it seems like it decompresses it somehow before sending it to the API, since I still see that error in the response.

Is it possible to add a compressQuery option before sending it?

Not sure if this counts as an issue or a question or an RFC, be free to scold me if it's not an RFC :)

Thanks for your time reading this.

Proposed Solution

Add an option to compress/minify the query string before sending it

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation 📖This needs to be documented but won't need code changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions