-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Make String parseValue coercion consistent with JS implementation & Gradle JCenter fix #3030
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
Conversation
@@ -54,7 +55,6 @@ class ScalarsStringTest extends Specification { | |||
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 |
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.
Splitting out tests for serialize
and parseValue
pluginManagement { | ||
repositories { | ||
mavenCentral() | ||
maven { |
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.
Snippet from gradle/gradle#22864 (comment)
@dondonz Since this is a breaking change I would consider to align also the other types:
I can help with these if you like |
Thanks, that's a good pickup @federicorispo. I'll add the other |
This PR makes String
parseValue
coercion 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.
parseValue
in 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.