Open jh-grundfos opened 1 week ago
Hi @jh-grundfos ,
Interesting! Could you please help me understand the behaviour by giving a small example of what the outcome would look like?
For example, if I have these two queries, what would be the outcome?
# src/User.graphql
query User {
user(id: "1") {
id
name
}
}
# src/Book.graphql
query Book {
book(id: "1") {
id
isbn
}
}
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