Skip to content
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

Search inside list using SelectInput #122

Open
ghost opened this issue Jul 26, 2022 · 0 comments
Open

Search inside list using SelectInput #122

ghost opened this issue Jul 26, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented Jul 26, 2022

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?

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

No branches or pull requests

0 participants