Skip to content
This repository has been archived by the owner on Sep 9, 2018. It is now read-only.

can't generate by Map.class #2

Open
gjbxx110 opened this issue Mar 15, 2017 · 3 comments
Open

can't generate by Map.class #2

gjbxx110 opened this issue Mar 15, 2017 · 3 comments

Comments

@gjbxx110
Copy link

gjbxx110 commented Mar 15, 2017

I have got a error when runing like this
BuildContext buildContext= DefaultBuildContext.reflectionContext; GraphQLOutputType a=buildContext.getOutputType(Map.class);

and the error result is

7:55.723 [main] WARN graphql.java.generator.type.TypeGenerator - Failed to generate type named sun_reflect_generics_reflectiveObjects_TypeVariableImpl with kind INPUT_OBJECT 14:47:55.728 [main] DEBUG graphql.java.generator.type.TypeGenerator - Failed to generate type, exception is graphql.AssertException: wrappedType can't be null at graphql.Assert.assertNotNull(Assert.java:10) at graphql.schema.GraphQLList.<init>(GraphQLList.java:13)

@danielkwinsor
Copy link
Contributor

I can confirm this behavior under JRE 8, but JREs 6 and 7 are able to handle maps. Let me research this more, but until then, perhaps a different JRE is an option.

@danielkwinsor
Copy link
Contributor

I have done additional work to support TypeVariables, can you please check 0.9.0 from master and see whether this satisfies your needs?

@MartinX3
Copy link

Weird error

Caused by: graphql.AssertException: wrappedType can't be null
	at graphql.Assert.assertNotNull(Assert.java:10) ~[graphql-java-3.0.0.jar:na]
	at graphql.schema.GraphQLList.<init>(GraphQLList.java:29) ~[graphql-java-3.0.0.jar:na]
	at de.predic8.tutorial.shopapigraphql.graphql.field.OrderFields.createTypes(OrderFields.java:78) ~[classes/:na]
	at de.predic8.tutorial.shopapigraphql.graphql.field.OrderFields.postConstruct(OrderFields.java:63) ~[classes/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:369) ~[spring-beans-5.0.0.RC3.jar:5.0.0.RC3]
Disconnected from the target VM, address: '127.0.0.1:39405', transport: 'socket'
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:312) ~[spring-beans-5.0.0.RC3.jar:5.0.0.RC3]
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:135) ~[spring-beans-5.0.0.RC3.jar:5.0.0.RC3]
	... 57 common frames omitted

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants