gql-dart / ferry

Stream-based strongly typed GraphQL client for Dart
https://ferrygraphql.com/
MIT License
593 stars 113 forks source link

[FerryGenerator] Feature Request: Single generated folder with `.graphql` files in multiple locations. #559

Open Icedude907 opened 7 months ago

Icedude907 commented 7 months ago

Hey there, thanks for making the project. I have a folder structure like so;

lib/gql/
|- schema/
| |- <Schema Files>.graphql
|- <Query & Mutatation Documents>.graphql

The schema is in a git submodule, making it tricky to move up the tree. 

Currently when running the generator on the project I get the following file tree:

lib/gql/
|- schema/
| |- __generated__/
|- __generated__/

Ideally I'd like to not have these two separate generated folders, either just everything flattened into a single folder, or a nested folder inside the __generated__ directory like so:

lib/gql/
|- schema/*.graphql
|- <Query & Mutatation Documents>.graphql
|- __generated__/
  |- schema/
  | |- schema.g.dart
  |- query.g.dart

Is this a possibility? Thanks again.

Edit

I've restructured my project so that all my graphql files are in the same folder (I just copy the schema between repositories rather than sharing a submodule) so I no longer have this issue. That being said I think this is still a valid feature request.