Skip to content

Unknown interface types in result list throws exception #6415

Description

@A360JMaxxgamer

Is there an existing issue for this?

  • I have searched the existing issues

Product

Strawberry Shake

Describe the bug

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

  1. Create strawberry shake client which queries for a list of a union type
  2. Return a json with an item which is not part of the union type of the generated client schema
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions