Skip to content

In what format I should generate Kotlin types from schema to enable schema driven development. #978

Answered by RIP21
RIP21 asked this question in Q&A
Discussion options

You must be logged in to vote

The answer would be, just set up a schema printer and compare manually created extension of the schema e.g. a contract agreed with FE or any other consumer or engineer, the one that is generated by the Kotlin GraphQL using graphql-inspector diff command :) As generating resolvers interfaces, or smth similar to that mostly makes no sense :) Tho I did it, but it's not as flexible or elegant enough to be a working thing. With raw graphql-java DataFetchers can work tho but it's way too verbose for my taste :)

The whole thing will look like this:

So printer bean:

package your.package

import com.expediagroup.graphql.extensions.print
import graphql.schema.GraphQLSchema
import org.springframewor…

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@RIP21
Comment options

@smyrick
Comment options

@RIP21
Comment options

@smyrick
Comment options

@RIP21
Comment options

Comment options

You must be logged in to vote
5 replies
@RIP21
Comment options

@smyrick
Comment options

@RIP21
Comment options

@smyrick
Comment options

@RIP21
Comment options

Answer selected by RIP21
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