feat: add GraphQL server config options
New Pull Request Checklist
- [x] I am not disclosing a vulnerability.
- [x] I am creating this PR in reference to an issue.
Issue Description
This pull request adds GraphQL config options to the CLI.
Related issue: #7939
Approach
TODOs before merging
- [x] Add tests
- [x] Add changes to documentation (guides, repository pages, in-code descriptions)
- [ ] Add security check
- [ ] Add new Parse Error codes to Parse JS SDK
- [x] A changelog entry is created automatically using the pull request title (do not manually add a changelog entry)
Thanks for opening this pull request!
- 🎉 We are excited about your hands-on contribution!
@mtrezza added some test cases, couldn't find a good example of a test case for the option so I reused the output logic from another test case.
Codecov Report
Merging #7940 (0b8b3bd) into alpha (b45d44e) will increase coverage by
0.32%. The diff coverage is69.23%.
@@ Coverage Diff @@
## alpha #7940 +/- ##
==========================================
+ Coverage 93.80% 94.12% +0.32%
==========================================
Files 182 182
Lines 13629 13642 +13
==========================================
+ Hits 12785 12841 +56
+ Misses 844 801 -43
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/Options/index.js | 100.00% <ø> (ø) |
|
| src/Config.js | 87.95% <60.00%> (-1.06%) |
:arrow_down: |
| src/Options/Definitions.js | 100.00% <100.00%> (ø) |
|
| src/ParseServer.js | 90.16% <100.00%> (+0.10%) |
:arrow_up: |
| ...dapters/Storage/Postgres/PostgresStorageAdapter.js | 95.46% <0.00%> (+0.07%) |
:arrow_up: |
| src/RestWrite.js | 94.46% <0.00%> (+0.15%) |
:arrow_up: |
| src/Adapters/Storage/Mongo/MongoStorageAdapter.js | 93.16% <0.00%> (+0.21%) |
:arrow_up: |
| src/ParseServerRESTController.js | 98.48% <0.00%> (+1.51%) |
:arrow_up: |
| src/Adapters/Cache/RedisCacheAdapter.js | 87.71% <0.00%> (+75.43%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update b45d44e...0b8b3bd. Read the comment docs.
@tstachl feel free to rebase on alpha and cover the validateGraphqlConfig with a dedicated test, then we should be close to the merge 🚀