-
Notifications
You must be signed in to change notification settings - Fork 359
add ktor server plugin module #1667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/** | ||
* Configuration properties that define supported GraphQL configuration options. | ||
*/ | ||
class GraphQLConfiguration(config: ApplicationConfig) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started with the same configuration properties as used by Spring. This config contains some properties that can be set through configuration files (i.e. same as spring) and others that can only be set programmatically.
I'm not a big fan of how this is all structured at the moment so most likely structure of this file will change.
In general there are 3 areas of configuration:
- schema - everything related to schema generation (e.g. which queries to include)
- engine - everything related to GraphQL Java engine configuration
- server - Ktor server custom config (e.g. context factory)
I'm thinking I will move the existing properties (which were matching spring config) under those three sections, e.g. when configuring schema I think it would make sense to specify target packages in the same place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One drawback of reorganizing the properties would be the change in property file mapping - currently properties match the path from the root graphql
prefix, e.g. graphql.packages
is a top level packages
property. If we move those around then we either have to use different properties than in Spring (not ideal but I guess it should be fine?) or have a mismatch between paths and variables, e.g.
graphql.packages
would becomegraphql.schema.packages
graphql.introspection.enabled
would becomegraphql.engine.introspection.enabled
📝 Description
Creates Ktor GraphQL Plugin with similar functionality as the existing SpringBoot auto-configuration module.
🔗 Related Issues
Resolves: #1471