-
Notifications
You must be signed in to change notification settings - Fork 221
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
Support implicit output type lookups for interface types. #600
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
Is it possible to add a small test case that does not compile without this change?
Hey @yanns, thanks again for your time. I added a test case but maybe it only shows, what I'm doing wrong. I need the first line in the test ( |
Thanks for your test. Am I missing something? |
Okay, that's embarrassing. I'm not sure what happend. 😅 Sorry. I updated the test to use its own types and now I get the error again, when I remove the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to be embarrassed 😉
Thanks a lot for the test.
I also don't understand why scalac is not able to use implicit def outLookup[T](implicit out: OutputType[T]): GraphQLOutputTypeLookup[T]
.
I've tried to change it to implicit def outLookup[T, OUT <: OutputType[T]](implicit out: OUT): GraphQLOutputTypeLookup[T]
but it still does not help.
👍
Holy forgotten PRs batman! Thanks for taking up the torch on this one @ocordsen ! |
This new implicit is causing issues on our existing code base: #615 |
I have to revert it for now: #616 |
Revert "Merge pull request #600 from ocordsen/master"
Hi @ocordsen, ty for work. For me this solution works partially and I do not know if I am doing smth wrong or this should not work by design. This is model of my setup (each class/trait with companion in it's own file)
If I have AType and BType in D imported (for example, important that only 1 of BType/CType) code compiles and only fails in runtime with cannot cast exeption if smth of C present in resulting Seq. If I try to import CType than compilation fails trying to derive DType with
|
This is a new version of #306. I hope it maybe can be merged or perhaps it leads to another idea to solve the problem with Interface-Types that cannot be found. All context is in the original pull request so I keep it short here. :)