Skip to content
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

Fixed handling of variables when delegating data fetching through the stitching context. #1390

Merged
merged 4 commits into from
Feb 24, 2020

Conversation

nigel-sampson
Copy link
Contributor

Using the remote query clients directly for queries that cannot be done via delegation are currently failing due to being unable to serialize in RemoteQueryClient.

This PR includes a test which shows this behavior.

@michaelstaib michaelstaib added this to the HC-10.4.0 milestone Jan 20, 2020
@michaelstaib michaelstaib self-assigned this Feb 24, 2020
@michaelstaib
Copy link
Member

I have a fix for version 11 now and will port it back to this pr today.

There are some caveats to it and this is why we actually changed it in the first place.

In stitching we sometimes do not know the actual scalar types, this means that we do not know how to serialize them. This in turn leads to errors when we have to serialize scalar values to pass them on.

So, if you provide the .NET types with this solution for an unknown type this will lead to an error since we cannot serialize it correctly.

You then would need to provide a custom scalar to the gateway so that we know how to handle it or give us the variable as GraphQL literal.

@michaelstaib michaelstaib changed the title Failure to serialize remote query clients when using stitching context Fixed handling of variables when delegating data fetching through the stitching context. Feb 24, 2020
@michaelstaib michaelstaib self-requested a review February 24, 2020 11:50
@michaelstaib
Copy link
Member

Fix is in ... will integrate it in preview 12

@sonarcloud
Copy link

sonarcloud bot commented Feb 24, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 1 Code Smell

85.4% 85.4% Coverage
0.0% 0.0% Duplication

@michaelstaib michaelstaib merged commit 3f19b6a into version_10_0_0_master Feb 24, 2020
@michaelstaib michaelstaib deleted the stitching-context-variables branch February 24, 2020 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants