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
allow reference input type #1185
Comments
i want to add reference field like
but it give error like
so how to done referencetype in GraphqlInputType ?? |
Would you be able to post a stack trace and put together a small unit test that compiles? Otherwise it will be hard to help. That said, my feeling here is you might already have registered on your schema the GraphQL specification - Input Objects:
|
Even if he has misconfigured his schema but putting an GraphqlObjectType in play we still need to double check that graphql-java does indeed allow circular Input objects, which in java are only possible via a TypeRef style indirection layer (unlike JS) See graphql/graphql-spec#189 and graphql/graphql-js#1359 I think we should double check that you can in fact do the following in graphql-java
|
Ok I have double check that GraphqlTypeReferences can be used with input object types and yes they can. I proved it with the above self referential type. I suspect the original report has a mix of output object types in his input objects types which is not allowed in graphql |
i m try to return type but all Sacalrtype is working fine but try to return foreign type like
so it give error like java.lang.ClassCastException: graphql.schema.GraphQLObjectType cannot be cast to graphql.schema.GraphQLInputType
The text was updated successfully, but these errors were encountered: