-
-
Notifications
You must be signed in to change notification settings - Fork 316
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
GraphService error and extension property deserialization fixes #1154
Merged
Conversation
This file contains 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
This was
linked to
issues
Feb 5, 2025
Closed
…rter to ints/bools to strings fixes #1152
…ngListConverter and PrimitiveStringConverterFactory
… into appropriate test folder
…lean value The FalseToNullConverter had a bug that would cause it to write any non-null, non-false value as `true`. In practice this should not have occurred since this converter was only meant to be applied to boolean properties, but CanConvert does allow it to be applied to strings as well.
…ects as a dictionary Fixes an issue where nested objects read by the converter would be returned as a SystemJsonElement. Related to #1149.
…ter attempts to write a value
…rs to dicts Add a System.Text.Json converter which is responsible for mapping the different json structures we've seen on the `GraphErrorExtensions.Value` property. So far the property can have the following two structures: 1. `{"Value":{"foo":"bar","baz":"bat"}}` 2. `{"Value":"bar"}` For backwards compatibility, the GraphErrorExtensionsValueConverter takes structure #2 and maps it to structure #1, maintaining the `IReadOnlyDictionary<string, object?>` type. An arbitrary key of `$value` is assigned in this case. Just speculation, but I believe that #2 happens when there is a problem with the parameter passed to a GraphQL query/mutation; the string `"bar"` here is the problematic parameter value. On the other hand, #1 represents a problem with a query or mutation structure, e.g. the data being queried. Fixes #1149
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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 is a draft pull request that I'm working on containing fixes for various bugs pertaining to the ShopifyJsonParseExceptions thrown by the GraphService when the
errors
orextensions
properties don't have the structure the service expects them to have.TODO:
GraphError.Path
will cause the GraphService to throw a ShopifyJsonParseException #1152