ChilliCream / ChilliCream/graphql-platform

StrawberryShake doesn't serialize filter conditions with null value

Open
#6,716 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

🌶️ strawberry shake repro-validated
Dominant language
C#
Stars
5.8k
Forks
810
Avg merge
15h 39m
Merged PRs (30d)
98

Description

Is there an existing issue for this?
  • I have searched the existing issues
Product

Strawberry Shake

Describe the bug

StrawberryShake doesn't serialize filter conditions with null value

Example
If send a request with a filter
var filter = new UserFilterInput { Address = new StringOperationFilterInput { Eq = null } };
In HotChocolate we get
{ address: { } }

Steps to reproduce

The repository for reproducing the error is available here https://github.com/Denis-ProfIT/HotChocolate.Demo

Relevant log output

No response

Additional Context?

No response

Version

13.7.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction repository linked in the issue and run the filter request using the provided UserFilterInput example. Compare the serialized request with the expected handling of the null Eq value; done means the filter condition is serialized correctly and the behavior is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, graphql
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.