-
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 lookups for interface types #306
Support implicit output lookups for interface types #306
Conversation
Thanks! It still puzzles me a bit since |
A quick question. According to the definitions in the example: implicit val TagType: InterfaceType[UserContext, GenericTag] = ...
implicit val ConcreteTagType: ObjectType[UserContext, GenericTag] = ... Which can be reduced down to: implicit val TagType: OutputType[UserContext, GenericTag] = ...
implicit val ConcreteTagType: OutputType[UserContext, GenericTag] = ... What is the difference between |
After another thought, I temporarily reverted the change. Today I would like to make a release with several important spec changes and one critical performance improvement. I would prefer not to delay today's release and also not to rush this change in order to better understand its implications. I always cautious about new generic implicits since they often have a big impact on scala compiler (more often than not, in very unintuitive ways). I would suggest proceeding with following plan: let's create another PR with the proposed change and in addition to it let's add a test case that would demonstrate and test this implicit (this test probably should not compile without proposed change). I think it would be very helpful. I think What do you think about it? |
Lol I was planning to do a test case, but I wanted to make sure that was the correct approach to take. Anyway, I'll re-open a new PR with a test case for this, once I figure out how to get the tests to run on windows correctly. |
If you are using windows, then I think there a 2 test files that rely of the carriage returns because they assert on AST node positions (you just need to make sure that these two test files have linux-style carriage returns |
Hi! I also encountered this problem. The code from @paulpdaniels fixed the problem for me, thanks for the pr:
As a workaround, I just pasted the lines next to my implicit types. |
I guess this PR should be reopened... |
Hi, I still have the problem, that I need the above lines of code if I introduce an InterfaceType. Is this "by design" or could it be fixed in Sangria? @yanns would you mind to take a look? (I hope it's okay to mention, I'm not sure if there is a notification otherwise.) Edit: I'm using version 2.1.0. |
Feel free to open a new PR with those changes so that we can check them. ❤️ |
Thanks for your friendly response. I created a pull request as mentioned above. |
Thank you for PR @ocordsen ! |
For context from the gitter channel.
e.g.
The problem seemed to be that scala has a hard time determining the implicit
GraphQLOutputTypeLookup
for anInterfaceType
.