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
graphqlbackend: Introduce JSONCString scalar type #6209
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6209 +/- ##
==========================================
+ Coverage 39.18% 39.33% +0.14%
==========================================
Files 1178 1170 -8
Lines 59520 58868 -652
Branches 5743 5743
==========================================
- Hits 23324 23155 -169
+ Misses 34051 33578 -473
+ Partials 2145 2135 -10
|
b9d1d28
to
0fac10f
Compare
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.
You need a CHANGELOG entry.
This is technically a backwards incompatible change. I worry it may break existing customers who are sending up JSONC (ie to add an external service / add a config). The graphql query will break since the variable will be declared as a string instead of a JSONC scalar. Additionally some clients may break when parsing responses (but I find this less of a concern). cc @slimsag/@beyang any idea of a customer who is sending config to Sourcegraph via our GraphQL API?
That's a good point. @felixfbecker In light of this: how about we only use |
0fac10f
to
583950b
Compare
If you want to smoothly transition you can make the old types take |
I gave this a shot with this: # A string or a JSONC string used to update settings or configuration.
union JSONInput = String | JSONCString But apparently GraphQL doesn't support that: graphql/graphql-spec#215 So, depending on how keen @felixfbecker is on introducing this field across the Schema, I'd say we only use it for the new fields we add. |
583950b
to
a417dfb
Compare
We can still use it existing return types, right? |
I assume so, yeah. Should I do that then? |
This is the first step towards implementing #6135. In order to keep the pull requests and diffs as small was possible, I split this out, since it's generic and can already be merged. I manually tested editing the site configuration, critical config in the management console, user and org settings. External service configuration is tested by e2e tests.
a417dfb
to
7b5c99a
Compare
@felixfbecker @keegancsmith: Added a CHANGELOG entry and only changed the output from |
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 is the first step towards implementing #6135.
In order to keep the pull requests and diffs as small was possible, I split this out, since it's generic and can already be merged.
I manually tested editing the site configuration, critical config in the management console, user and org settings. External service configuration is tested by e2e tests.