title: GraphQL, how to return type of byte[]
body: <p>I have thumbnails saved in my database as a byte array. I can't seem to workout how to return these to the frontend clients via GraphQL. </p>
  
  <p>In a standard REST approach I just send a POJO back with the bytes and I can easily render that out. </p>
  
  <p>However trying to return a <code>byte[]</code> is throwing </p>
  
  <blockquote>
    <p>Unable to match type definition (ListType{type=NonNullType{type=TypeName{name='Byte'}}}) with java type (class java.lang.Byte): Java class is not a List or generic type information was lost: class java.lang.Byte</p>
  </blockquote>
  
  <p>The error is descriptive and tells me what's wrong, but I don't know how to solve that. </p>
  
  <p>My <code>thumbnail.graphqls</code> looks like: </p>
  
  <pre><code>type Thumbnail {
      id: ID!
      resource: [Byte!]
  }
  </code></pre>
  
  <p>And the thumbnail POJO</p>
  
  <pre><code>public class Thumbnail extends BaseEntity {
      byte[] resource;
  }
  </code></pre>
  
  <p>I'm using <code>graphql-spring-boot-starter</code> on the Java side to handle things, and I think it supports <code>Byte</code> out the box, so where have I gone wrong? </p>
  
  <p>Very fresh to GraphQL so this could just be an obvious mistake. </p>
  
  <p>Cheers, </p>