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
Allow more options to the Apollo Server config #7665
Conversation
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
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.
Yeah sth like that would allow to pass any param the users want. In v4 we can break the config to have a apolloServerConfig key to make it cleaner :)
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
sth wrong with the tests :) |
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
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.
this will need a doc update before we can merge and a deprecation warning :)
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
@alexandrebodin all updated! 🚀 How would you want to add a deprecation warning? |
Codecov Report
@@ Coverage Diff @@
## master #7665 +/- ##
==========================================
+ Coverage 27.16% 27.20% +0.03%
==========================================
Files 1163 1164 +1
Lines 15518 15517 -1
Branches 2410 2410
==========================================
+ Hits 4216 4221 +5
+ Misses 9534 9528 -6
Partials 1768 1768
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
@derrickmehaffy can you help @abdonrd to update the graphql doc with a deprecation warning for those old params
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
I think we should remove the old keys from the default config. and if the user sets them display a warning with strapi.log.warn() |
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
@alexandrebodin @abdonrd sure, we are just moving the tracing one right? |
Yeah! |
Would be best to just adjust the documentation and move this into a major release and throw the warning in the migration guide. It's small, and the number of people actually using the tracing feature should be very low as it decreases the performance of GraphQL quite a lot. If you want to write something up here @abdonrd I'll just ensure it gets added to the next migration guide. @alexandrebodin did we have a planned date for |
@derrickmehaffy Done! |
Reminder to myself when we start looking at redoing the docs, this entire GraphQL documentation needs to be rewritten x_x |
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
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.
LGTM on the docs side, pending review from Alex on the code side
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com>
Thanks again for the review @alexandrebodin! It should work now! |
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
* Extract server config to a constant Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Omit options to server config Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Move default config to serverParams Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Simplify Apollo server config Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Simplify with a new apolloServerConfig property Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Update tracing documentation Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Extract deprecated options Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Add default options Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Update documentation Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Rename to deprecatedApolloServerConfig Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Empty default options Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Update default config Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Add warning note Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Add documentation note Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Update documentation note Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Fix the config check Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Fix the config check Signed-off-by: Abdón Rodríguez Davila <a@abdonrd.com> * Refactor old code and rename param to appoloServer to avoid redondancy Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com> * Fix typo Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com> Co-authored-by: Alexandre Bodin <bodin.alex@gmail.com> Signed-off-by: Garrett Fritz <garrettfritz@garretts-mbp.home>
Description of what you did:
Allow more options to the Apollo Server config