-
Notifications
You must be signed in to change notification settings - Fork 662
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
Type with "Companion" name causes compile error #4629
Comments
Thanks for raising this 🙏 . We'll add auto escapes rules for that. In the meantime, you can workaround by using Add an extend type Companion @targetName(name: "Companion_") That should use |
Hi, thank you for responding so quick! I've tried your solution but it didn't work, the same error appears on compilation. Do you think it may be related to having various schemas in the project? This is an example of the folder structure I have with two schemas: one with a "Companion" type. I added the
On my app build.gradle I have defined the two apollo schemas like this: apollo {
service("service1"){
srcDir("src/main/graphql/service1")
packageName.set("com.test.apollo.service1")
}
service("service2"){
srcDir("src/main/graphql/service2")
packageName.set("com.test.apollo.service2")
}
} I hope this helps! Thank you again! |
That should have worked 🤔 . Let me check quickly if I can reproduce. |
Could it be that the issue is on a Do you have anything like this in your queries?
If yes, then the workaround would be to use aliases in your query:
|
That's was it! Thank you for helping me! |
Nice, thanks for confirming. |
Version
3.7.3
Summary
When a graphql schema contains a type with the name "Companion" it causes the project to not compile.
Steps to reproduce the behavior
Logs
The text was updated successfully, but these errors were encountered: