-
Notifications
You must be signed in to change notification settings - Fork 194
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
Two GraphQL queries are being created with the same name #525
Comments
The solution to this issue isn't that obvious. The reason why queries are generated with the same name in your example is that Anyways, we should add an additional protection mechanism to prevent such names clash. If you have any ideas + you would like to create a PR for this issue, that would be more than welcome! |
HI, I also ran into this issue when creating a new resource. To solve this, I would think for So going with the example of this issue, |
I'm submitting a...
Current behavior
The findAll and findOne boilerplate queries are being created with the same name, resulting in only the latter being generated on the GQL Schema file.
I've tracked the problem in the files and seems to me that the faulty code is in this file: "src/lib/resource/files/ts/name.resolver.ts" . If just altering the name of the query suffice, I could send a PR.
Expected behavior
The two resolvers should be generated into the GQL Schema file.
Minimal reproduction of the problem with instructions
run the nest g resource and select the GraphQL Code First approach**. Then, look at the generated GQL file.
What is the motivation / use case for changing the behavior?
Fix the bug
Environment
The text was updated successfully, but these errors were encountered: