micimize / graphql-to-dart

generate dart classes and respective JsonSerializable transcoders
42 stars 8 forks source link

Discussion: Bake gql inside of a more global operation class #28

Open ryankauk opened 4 years ago

ryankauk commented 4 years ago

If you create the gql right into the class (similar to apollo-angular), you would not need to import the gql files during runtime and also just bake the fragments into each document.

micimize commented 4 years ago

right now there is an integrateGqlCodeGenAst: true option which will reexport the built asts from gql_code_gen, but yeah it would be ideal to have an option to add the original query on the class. This shouldn't be too difficult for operation classes actually