title: java-graphql - Unable to match type definition with java type
body: <p>I am using graphql-spring-boot to serve graphql queries from my spring-boot project. Right now I am working on matching the graphql scheme type definitions with my spring entites. For whatever reason, I am getting the following error:</p>
  
  <pre><code>Caused by: com.coxautodev.graphql.tools.SchemaClassScannerError: Unable to match type definition (ListType{type=TypeName{name='HomestayInfo'}}) with java type (class ninja.familyhomestay.domain.HomestayInfo): Java class is not a List or generic type information was lost: class ninja.familyhomestay.domain.HomestayInfo
      at com.coxautodev.graphql.tools.TypeClassMatcher.error(TypeClassMatcher.kt:19)
      at com.coxautodev.graphql.tools.TypeClassMatcher.match(TypeClassMatcher.kt:79)
      at com.coxautodev.graphql.tools.TypeClassMatcher.match(TypeClassMatcher.kt:25)
  </code></pre>
  
  <p>Here's my graphql schema defintion for <code>HomestayInfo</code>:</p>
  
  <pre><code>type HomestayInfo{
      homestayName: String
      homestayShortDescription: String
      homestayDescription: String
      address: Address
      rooms: [Room]
      houseImages: [HouseImage]
      pets: [Pet]
  }
  </code></pre>
  
  <p>and the corresponding kotlin entity:</p>
  
  <pre><code>@Entity
  @Table(name = "homestay_info")
  @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
  @Document(indexName = "homestay_info")
  data class HomestayInfo(
      @Id
      @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
      @SequenceGenerator(name = "sequenceGenerator")
      var id: Long? = null,
  
      @Column(name = "homestay_name")
      var homestayName: String? = null,
  
      @Column(name = "homestay_short_description")
      var homestayShortDescription: String? = null,
  
      @Column(name = "homestay_description")
      var homestayDescription: String? = null,
  
      @OneToOne
      @JoinColumn(name = "address_id")
      var address:Address?=null,
  
      @OneToMany(mappedBy = "homestayInfo", cascade = [CascadeType.ALL], fetch = FetchType.LAZY)
      var rooms: MutableSet&lt;Room&gt; = HashSet(),
  
      @OneToMany(mappedBy = "homestayInfo", cascade = [CascadeType.ALL], fetch = FetchType.LAZY)
      var houseImages: MutableSet&lt;HouseImage&gt; = HashSet(),
  
      @OneToMany(mappedBy = "homestayInfo", cascade = [CascadeType.ALL], fetch = FetchType.LAZY)
      var pets: MutableSet&lt;Pet&gt; = HashSet()
  ) : Serializable
  </code></pre>
  
  <p>I don't see anything wrong with the mapping. Any ideas?</p>