Skip to content

Strawberry Shake: fails to map properties when nested object is the same type on subscription. (EntityID null crash) #8290

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

Open
JcMeilleurOpsun opened this issue May 15, 2025 · 0 comments

Comments

@JcMeilleurOpsun
Copy link

Product

Strawberry Shake

Version

15.1.3

Link to minimal reproduction

Steps to reproduce

It look very similar to this
#5256
But this issues is open since 2022 so my guest is that is was maybee not fixed for sub or something that slip through the crack.
So the problem need to meet those criteria

  • The nested object type must be the same as the parent (although it doesn't have to be the immediate child)
  • The parent object must contain an id field.
    So example If I have a query with this
contact{
    id,
    firstName
    marketingContact{
        isSubscribe
        contact_id
    }
}

and if I use the same for subscription, it will work if the marketingContact is NOT null.
But if my subscription return a null on the MarketingContact, it crash.
Theres a error on the Json parse on the EntityID (the id that strawberryshake auto generate)

For now I use the Graphql.net package for the subscription and it's working, so it's really related to the autogenerated code in SS.

Let me know if you need more information.
It's pretty hard to give a Repo since it's all linked with the DB, but if you really need one let me know and Ill see what I can do.
Thanks

What is expected?

Not to crash

What is actually happening?

It crash

Relevant log output

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant