ChilliCream / ChilliCream/graphql-platform

Get all where sub-item is null

Open
#5,102 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

🌶️ hot chocolate Area: Data
Dominant language
C#
Stars
5.8k
Forks
810
Avg merge
15h 39m
Merged PRs (30d)
98

Description

Is your feature request related to a problem?

Sorry if this is basic! But I just can´t filter/select by null values. I have looked everywhere. I have tried all kinds of syntax without any luck. I gave this here a go https://chillicream.com/docs/hotchocolate/fetching-data/filtering.

So here I´m getting everything, and you see a Site == null. I would like to get all where Site == null

image
The solution you'd like

But I would like something like this this

{
devices(where: { site: { any: false} }) {
    nodes{
        id
        machineCode
        site {
                id
                customer {
                    id
                }
                address {
                    city
                }
            }
        hardwareInformation {
            systemVendor
        }
    }
}

Is this possible to day?

Product

Hot Chocolate

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 by reproducing the devices query from the issue and compare it with the Hot Chocolate filtering documentation linked there. Investigate how filtering represents a null related Site, then verify that an equivalent filter returns only devices whose Site is null.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, graphql
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.