-
After I ran the app I want to write SDL that is logged into the console and can be retrieved from /sdl endpoint, into a local file. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@RIP21 The https://expediagroup.github.io/graphql-kotlin/docs/spring-server/spring-beans So you can have a start up bean that depends on on the schema bean and prints the schema to a file. fun printToFile(schema: GraphQLSchema) {
File(fileName).writeText(schema.print())
} |
Beta Was this translation helpful? Give feedback.
@RIP21 The
GraphQLSchema
bean is created automatically and can be used by any part of your applicationhttps://expediagroup.github.io/graphql-kotlin/docs/spring-server/spring-beans
So you can have a start up bean that depends on on the schema bean and prints the schema to a file.