You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Recursive input type breaks if wrapped in a list #36
com.coxautodev.graphql.tools.SchemaClassScannerError: Two different classes used for type LinkFilter:
- class com.something.LinkFilter:
| parameter 0 of method public java.util.List com.something.Query.allLinks(com.something.LinkFilter)
- interface java.util.List:
| input object InputValueDefinition{name='OR', type=ListType{type=NonNullType{type=TypeName{name='LinkFilter'}}}, defaultValue=null, directives=[]}
If I unwrap the OR field to just a LinkFilter, everything is fine.
On Sat, Jul 8, 2017, 10:35 PM Bojan Tomić ***@***.***> wrote:
The following scenario seems to break:
type Query {
allLinks(filter: LinkFilter): [Link]
}
input LinkFilter {
OR: [LinkFilter!]
description_contains: String
url_contains: String
}
And the LinkFilter POJO:
public class LinkFilter {
private List<LinkFilter> OR;
private String description_contains;
private String url_contains;
//getters & setters
}
The exceptions is:
com.coxautodev.graphql.tools.SchemaClassScannerError: Two different
classes used for type LinkFilter:
- class com.something.LinkFilter:
| parameter 0 of method public java.util.List
com.something.Query.allLinks(com.something.LinkFilter)
- interface java.util.List:
| input object InputValueDefinition{name='OR',
type=ListType{type=NonNullType{type=TypeName{name='LinkFilter'}}},
defaultValue=null, directives=[]}
If I unwrap the OR field to just a LinkFilter, everything is fine.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#36>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB44WJT4ZCN5U7AsG6QFM13GM_-bFgT5ks5sMDyHgaJpZM4OR7rn>
.
I gave fixing this a shot at #37, but it's my first time seeing Kotlin (or this code-base) so...
Feel free to reject and rewrite if it's bad. I ticked "allow edits from maintainers" in case you find some value in it.
Not sure, if you saw my Gitter message. The TLDR version is: I'm writing a tutorial for a new GraphQL learning portal by Graph.cool and used this lib in all the examples and the sample project in the Java track. The deadline is in 2 days, so I was trying to get this fix in time if possible. If not, I'll try working around this issue in the examples somehow.
Activity
apottere commentedon Jul 9, 2017
kaqqao commentedon Jul 9, 2017
I gave fixing this a shot at #37, but it's my first time seeing Kotlin (or this code-base) so...
Feel free to reject and rewrite if it's bad. I ticked "allow edits from maintainers" in case you find some value in it.
Not sure, if you saw my Gitter message. The TLDR version is: I'm writing a tutorial for a new GraphQL learning portal by Graph.cool and used this lib in all the examples and the sample project in the Java track. The deadline is in 2 days, so I was trying to get this fix in time if possible. If not, I'll try working around this issue in the examples somehow.