jcrygier / graphql-jpa

JPA Implementation of GraphQL (builds on graphql-java)
MIT License
165 stars 46 forks source link

@GraphQLIgnore does not always ignore unsupported types #40

Closed stomf closed 6 years ago

stomf commented 6 years ago

An exception is thrown if an entity in the JPA model contains an unsupported data type, eg a byteArray:

java.lang.UnsupportedOperationException: Attribute could not be mapped to GraphQL: field 'data' of entity class 'org.crygier.graphql.model.starwars.Droid'

It is possible to suppress this exception by adding @GraphQLIgnore to the offending field. However this does not work if the entity is referenced by another entity in the model.

Issue can be duplicated by adding

@GraphQLIgnore byte[] data;

to the Droid model; all the test cases fail when trying to build the schema.

jcrygier commented 6 years ago

See Pull Request #41. Thanks!