Enigmatis / graphql-java-annotations

GraphQL Annotations for Java
Other
387 stars 97 forks source link

java.lang.ClassCastException: graphql.schema.GraphQLTypeReference cannot be cast to graphql.schema.GraphQLObjectType #233

Closed shevek closed 4 years ago

shevek commented 5 years ago

I'm sure I've done something wrong, but I don't know what, and this is unhelpful as an error.

        at graphql.annotations.processor.typeBuilders.UnionBuilder.lambda$getUnionBuilder$1(UnionBuilder.java:78)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
        at graphql.annotations.processor.typeBuilders.UnionBuilder.getUnionBuilder(UnionBuilder.java:79)
        at graphql.annotations.processor.retrievers.GraphQLTypeRetriever.getGraphQLType(GraphQLTypeRetriever.java:75)
        at graphql.annotations.processor.graphQLProcessors.GraphQLOutputProcessor.getOutputTypeOrRef(GraphQLOutputProcessor.java:44)
        at graphql.annotations.processor.typeFunctions.ObjectFunction.buildType(ObjectFunction.java:55)
        at graphql.annotations.processor.typeFunctions.DefaultTypeFunction.buildType(DefaultTypeFunction.java:104)
        at graphql.annotations.processor.retrievers.fieldBuilders.method.MethodTypeBuilder.build(MethodTypeBuilder.java:52)
        at graphql.annotations.processor.retrievers.GraphQLFieldRetriever.getField(GraphQLFieldRetriever.java:77)
        at graphql.annotations.processor.typeBuilders.OutputObjectBuilder.getOutputObjectBuilder(OutputObjectBuilder.java:81)
        at graphql.annotations.processor.retrievers.GraphQLTypeRetriever.getGraphQLType(GraphQLTypeRetriever.java:86)
        at graphql.annotations.processor.graphQLProcessors.GraphQLOutputProcessor.getOutputTypeOrRef(GraphQLOutputProcessor.java:44)
        at graphql.annotations.processor.typeFunctions.ObjectFunction.buildType(ObjectFunction.java:55)
        at graphql.annotations.processor.typeFunctions.DefaultTypeFunction.buildType(DefaultTypeFunction.java:104)
        at graphql.annotations.processor.typeFunctions.IterableFunction.buildType(IterableFunction.java:54)
        at graphql.annotations.processor.typeFunctions.DefaultTypeFunction.buildType(DefaultTypeFunction.java:104)
        at graphql.annotations.processor.retrievers.fieldBuilders.method.MethodTypeBuilder.build(MethodTypeBuilder.java:52)
        at graphql.annotations.processor.retrievers.GraphQLFieldRetriever.getField(GraphQLFieldRetriever.java:77)
        at graphql.annotations.processor.typeBuilders.OutputObjectBuilder.getOutputObjectBuilder(OutputObjectBuilder.java:81)
        at graphql.annotations.processor.retrievers.GraphQLTypeRetriever.getGraphQLType(GraphQLTypeRetriever.java:86)
        at graphql.annotations.processor.graphQLProcessors.GraphQLOutputProcessor.getOutputTypeOrRef(GraphQLOutputProcessor.java:44)
        at graphql.annotations.processor.typeFunctions.ObjectFunction.buildType(ObjectFunction.java:55)
        at graphql.annotations.processor.typeFunctions.DefaultTypeFunction.buildType(DefaultTypeFunction.java:104)
        at graphql.annotations.processor.retrievers.fieldBuilders.method.MethodTypeBuilder.build(MethodTypeBuilder.java:52)
        at graphql.annotations.processor.retrievers.GraphQLFieldRetriever.getField(GraphQLFieldRetriever.java:77)
        at graphql.annotations.processor.typeBuilders.OutputObjectBuilder.getOutputObjectBuilder(OutputObjectBuilder.java:81)
        at graphql.annotations.processor.retrievers.GraphQLTypeRetriever.getGraphQLType(GraphQLTypeRetriever.java:86)
        at graphql.annotations.processor.retrievers.GraphQLObjectHandler.getGraphQLType(GraphQLObjectHandler.java:32)
        at graphql.annotations.processor.GraphQLAnnotations.object(GraphQLAnnotations.java:124)
yarinvak commented 5 years ago

That's not the way of opening issues... Please provide your use case - and how this error was generated. Otherwise there is not much we can do