Skip to content

schema-generation using Java classes #1149

Answered by dariuszkuc
huehnerlady asked this question in Q&A
Discussion options

You must be logged in to vote

@huehnerlady Java types are considered platform types which yes means they are neither nullable nor non-nullable (see the link doc for details). I just tried the annotation approach specified in the KType.isMarkedNullable and it works fine if you use annotations with runtime retention (i.e. spotbugs-annotations).

See https://github.com/dariuszkuc/graphql-kotlin-java-models which correctly generate

type Foo {
  getBar: String!
  getBaz: Int
}

from corresponding Java model.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
4 replies
@huehnerlady
Comment options

@smyrick
Comment options

@huehnerlady
Comment options

@huehnerlady
Comment options

Comment options

You must be logged in to vote
2 replies
@huehnerlady
Comment options

@huehnerlady
Comment options

Answer selected by huehnerlady
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants