Skip to content

Extract generated client queries #10195

Open
@jh-grundfos

Description

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

Hey

I'm in need of a CLI or similar to extract all queries from a client app. The intended use is for mocking, testing and perhaps query whitelisting in production.

The Apollo CLI had this feature

https://github.com/apollographql/apollo-tooling/?tab=readme-ov-file#apollo-clientextract-output

However, that repo is actively being deprecated and is no longer maintainted, and not compatible with newer versions of Node.

I thought this might be something on your radar/roadmap as maintainers of

@graphql-codegen/cli and @graphql-codegen/client-preset ?

A button to export queries active on an environment on the Hive dashboard could also make sense, but maybe that request should be specifically made to the Hive team?

Describe the solution you'd like

A tool that extracts the queries in an app that uses @graphql-codegen/cli, preferably to a JSON output.

Describe alternatives you've considered

https://github.com/apollographql/apollo-tooling/?tab=readme-ov-file#apollo-clientextract-output

Any additional important details?

No response

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions