Make String parseValue coercion consistent with JS implementation & Gradle JCenter fix#3030
Merged
Make String parseValue coercion consistent with JS implementation & Gradle JCenter fix#3030
Conversation
dondonz
commented
Nov 26, 2022
| def "String serialize #value into #result (#result.class)"() { | ||
| expect: | ||
| Scalars.GraphQLString.getCoercing().serialize(value, GraphQLContext.default, Locale.default) == result | ||
| Scalars.GraphQLString.getCoercing().parseValue(value, GraphQLContext.default, Locale.default) == result |
Member
Author
There was a problem hiding this comment.
Splitting out tests for serialize and parseValue
dondonz
commented
Nov 26, 2022
| pluginManagement { | ||
| repositories { | ||
| mavenCentral() | ||
| maven { |
Contributor
|
@dondonz Since this is a breaking change I would consider to align also the other types:
I can help with these if you like |
bbakerman
approved these changes
Nov 29, 2022
Member
Author
Thanks, that's a good pickup @federicorispo. I'll add the other |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes String
parseValuecoercion consistent with the JS reference implementation, by only allowing String input values. Fixes #2990.Consistent implementation of String coercion is particularly important for String-based custom scalars.
Note that this is a breaking change.
parseValuein JS implementation: https://github.com/graphql/graphql-js/blob/main/src/type/scalars.ts#L156This PR also fixes the Gradle settings to avoid redirecting to the defunct JCenter when the Gradle module metadata is not published by a plugin (in our case, the jmh plugin). gradle/gradle#22864 (comment)
There was a problem with a JCenter SSL certificate expiring earlier today.