Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find graphql files under queries path recursively #83

Open
etareduction opened this issue May 11, 2023 · 3 comments
Open

Find graphql files under queries path recursively #83

etareduction opened this issue May 11, 2023 · 3 comments

Comments

@etareduction
Copy link
Contributor

So we can organize queries in folders like query and mutation

@Zaid-Ajaj
Copy link
Owner

The generated F# query and mutation files are created one-to-one from the GraphQL query files in a flat manner. If I add something like this, there is a chance that file names can collide when there are queries with the same name in different sub-directories.

I am leaning more towards keeping things simple as they are right now and if you need better namespacing, maybe consider adding a suffix or prefix to your query document names i.e. Query_Search.gql, Mutation_UpdateUser.gql etc.

Not the prettiest but should work well in IDEs when you start typing Mutation... or Query...

@etareduction
Copy link
Contributor Author

@Zaid-Ajaj Would placing generated types for different subdirectories in separate dotnet namespaces help with that, or is it too much effort in current implementation?

@Zaid-Ajaj
Copy link
Owner

I think that complicates things a lot 😞 would rather keep the file structure as is right now. It is also possible to generate multiple projects from the same schema having different queries or mutations in each project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants