graphql-client icon indicating copy to clipboard operation
graphql-client copied to clipboard

CLI code generation: how can we support globbing?

Open tomhoule opened this issue 7 years ago • 2 comments

I don't have a lot of time to elaborate right now, but other graphql code generation CLIs support passing a glob of all query files to generate code for (e.g. src/**/*.graphql) and dumping the result into one module. apollo-codegen for example supports this.

There are a few problems with this in the context of this project:

  • how do we select the operation inside a query document? Do we only take the first? All of them? A custom annotation?
  • It would be nice if we could also implement code sharing for fragments and enums.

tomhoule avatar Sep 18 '18 06:09 tomhoule

Related to #102.

mathstuf avatar Sep 20 '18 15:09 mathstuf

Also related to #134

tomhoule avatar Sep 23 '18 05:09 tomhoule