You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use case:
Let's say I have some kind of following schema.
type Query {
getItems: [Item]
}
type A {}
type B {}
type C {}
union Item = A | B | C
C was later reduced to my schema and my blazor app with my strawberry shake client was not yet updated. The client still operates on the schema.
type Query {
getItems: [Item]
}
type A {}
type B {}
union Item = A | B
Error:
After my gateway or service is updated with type C my client in the app is broken. It fails on deserializing the received data.
Even though it only has fragments for the known types A and B.
Expectation:
The app ignores the unknown type and operates normally.
In my scenario various services broke even though they don't care about the new types.
Steps to reproduce
Create strawberry shake client which queries for a list of a union type
Return a json with an item which is not part of the union type of the generated client schema
The client cannot deserialize the items
Relevant log output
No response
Additional Context?
My main issue is, that I cannot dynamically enhance my platform without updating my strawberry shake clients if each fails of unknown types.
Version
13.3.0
The text was updated successfully, but these errors were encountered:
I would suggest instead of throwing a NotSupport exception, the deserialization returns null and only items which are not null are added to the list. If the solution is fine for you guys, I can fix it and submit a pr in the next days.
Is there an existing issue for this?
Product
Strawberry Shake
Describe the bug
Use case:
Let's say I have some kind of following schema.
C was later reduced to my schema and my blazor app with my strawberry shake client was not yet updated. The client still operates on the schema.
Error:
After my gateway or service is updated with type C my client in the app is broken. It fails on deserializing the received data.
Even though it only has fragments for the known types A and B.
Expectation:
The app ignores the unknown type and operates normally.
In my scenario various services broke even though they don't care about the new types.
Steps to reproduce
Relevant log output
No response
Additional Context?
My main issue is, that I cannot dynamically enhance my platform without updating my strawberry shake clients if each fails of unknown types.
Version
13.3.0
The text was updated successfully, but these errors were encountered: