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
Introduce config properties #88
Comments
Using |
Preface Thoughts
SummarySo interestingly enough, only 1 of the example configuration "knobs" in the description would introduce a Some config props end up not being used in code (hitting the ConfigurationProperties accessors) but are rather used in SpEL paths in annotations such as
First GlanceI took a quick stab at implementing the config "knobs" in this sample branch Here is a summary:
Kapt and annotation processingAlso, I am not super familiar w/ Kotlin, but I do see this information around config props and kapt. Looks like Kapt will need to be configured in etc.. Next stepsI propose that we do the following:
Another approach could be to split out the non config props work such as:
Ok, enough of my rambling manifesto. I am interested and already invested in this ticket and can follow through whatever approach we decide on. Just lmk. |
Thanks for the detailed description and branch @bono007! @berngp Can you have a look at this as well? |
Nice analysis @bono007 I wasn't aware of the additional metadata info and I guess that also helps with auto-completion of property files in e.g. IntelliJ? In the past I've added all properties to I think it absolutely makes sense to split up the work in the tickets you mentioned. Being able to easily enable/disable the Graph_i_QL and the schema json endpoints would be a big win for me personally and the main reason I created this issue. |
About 15 minutes after adding my comment, my co-worker (who must be watching the repo closely) pinged me and pointed out that we will want to configure the path to graphiql within the next month in our applications. So, great foresight @marceloverdijk :) @paulbakker I am going to go ahead and follow through w/ the non-config props work in my branch (add tests and docs) as I have a nice hacking window carved out this am. If we end up shifting direction after @berngp reviews the above then I will gladly pivot, update, etc.. |
@bono007 LOL 👍 |
…uration properties Fixes Netflixgh-88
…uration properties Fixes Netflixgh-88
@bono007 thanks for the arguments you made and the PR! Already approved the PR. For completeness I included some thoughts that came to mind when reviewing the PR.
|
@berngp you are welcome and thank you for the review and feedback. I like your idea on 1) above, and in a follow on PR sounds good. On 2), yep, agreed and I intend on doing that in the scope of the current MR but just ran out of time this morning. I will add that later this evening though. |
This can be done separately from the first PR, but we'll need some more work for GraphiQL. E.g. if you change the |
In that case, I would be in favor of pulling the config "knob" for the graphql path out of this PR and into the start of a follow on PR that would add the config for both graphql path and graphiql path. I don't mind doing it - just lmk. |
That sounds good to me! |
Everything else looks good to me; I have also tested it in a test app and it seems to work well. @bono007 Can you confirm Kapt is required for the config properties to be picked up? I'm ok adding it, but only if necessary. |
…on and graphiql endpoints. Fixes Netflixgh-88
I have created #141 for ticket "2" in the earlier discussion so it will not be forgotten and can be tracked. |
The DGS framework takes a hard stance on how to configure itself:
/graphql
path/schema.json
path and whether it is enabled or not/graphiql
path and whether it is enabled or notclasspath*:schema/**/*.graphql*
to load the schema files fromIt would be nice if DGS would offer some configuration options like:
Rationale is to be able to change paths, but also to disable certain functionality.
E.g. GraphiQL is very useful during development but it might be desired or required to disable this in production because of security requirements or customized GraphiQL pages served differently (same for
/schema.json
).For the schema-location, some might want to use a different location like
classpath:graphql/schema.graphqls
to reduce classpath scanning.Probably there are more hardcoded things that could be moved to @ConfigrationProperties (websockets?)
The text was updated successfully, but these errors were encountered: