hasura / ra-data-hasura

react-admin data provider for Hasura GraphQL Engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Search inside list using SelectInput

opened this issue · comments

Hello everyone.

I've been trying to run this where query in GraphQL using the library:

"where": {
  "_and": [
    {
      "config": {
        "_contains": {
          "steps": [
            {
              "sources": [
                {
                  "integration_id": 784
                }
              ]
            }
          ]
        }
      }
    }
  ]
}

When I use SelectInput, I can't make ra-data-hasura put the [] between steps and sources:

<SelectInput
  label="Integration ID"
  source="config@_contains.steps.sources.integration_id"
  choices={integrationsPerOrg}
  alwaysOn
/>

The code generated by this source is:

"where": {
  "_and": [
    {
      "config": {
        "_contains": {
          "steps": {
            "sources": {
              "integration_id": 784
            }
          }
        }
      }
    }
  ]
}

What I should do to generate the right where query in the first example?