graphql-java-tools icon indicating copy to clipboard operation
graphql-java-tools copied to clipboard

Issue with Byte schema type definition

Open pritamroy11 opened this issue 5 years ago • 1 comments

I have a graphql schema definition like:

type Response {
    fileName: String
    contents: [Byte]
    contentType: String
}

in the Response pojo I have the below code for Byte[] with getter and setter: private Byte[] contents;

Now, I am getting exception while running the springboot app:

Caused by: com.coxautodev.graphql.tools.SchemaClassScannerError: Unable to match type definition (ListType{type=TypeName{name='Byte'}}) with java type (class [Ljava.lang.Byte;): No TypeDefinition for type name Byte

in pom.xml, I have below dependencies:

\<dependency\>
         \<groupId\>com.graphql-java-kickstart\<\/groupId\>
	\<artifactId\>graphql-spring-boot-starter\<\/artifactId\>
	\<version\>5.11.1\<\/version\>
\<\/dependency\>
\<dependency\>
	\<groupId\>com.graphql-java-kickstart\<\/groupId\>
	\<artifactId\>graphql-java-tools\<\/artifactId\>
	\<version\>5.7.1\<\/version\>
\<\/dependency\>

pritamroy11 avatar Nov 19 '19 01:11 pritamroy11

Byte is not a GraphQL built-in type. How do you define it?

vojtapol avatar Feb 04 '20 16:02 vojtapol