Skip to content

[schema generator] Where is the schema returning from toSchema() supposed to go? (Spring GraphQL) #1597

Answered by dariuszkuc
ivargj asked this question in General
Discussion options

You must be logged in to vote

Hello 👋
spring-graphql is a completely separate project that uses SDL first approach to load schema file and automatically map resolvers based on some annotations (e.g. @QueryMapping/@SchemaMapping). graphql-kotlin follows a code first approach where code is used to define the schema which is constructed dynamically at runtime.

While you could potentially wire up graphql-kotlin generated schema through GraphQlSourceBuilderCustomizer and schemaFactory method (similar to spring-projects/spring-graphql#384) but I don't think thats a good idea - basically you would loose all the runtime wiring information provided by spring-graphql so all your Spring annotated methods would stop working (or i…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by samuelAndalon
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1596 on November 08, 2022 17:52.