Is there an equivalent to an OR operation in Speckle's GraphQL

Hi, @dimitrie

I’ve tested an alternative for AND operator you provided, works fine:

    {
      "field": "level.name",
      "value": "5FL",
      "operator":"="
    },
    {
      "field":"speckle_type",
      "value":"Objects.BuiltElements.Column:Objects.BuiltElements.Revit.RevitColumn",
      "operator": "="
    }

But is there any alternative to OR? I haven’t figured out how I can simulate the or logic here.

@Iyur, nothing within the GraphQL syntax is as easily reproducible for OR as it is for AND.

Given that it is the equivalent of two queries, this is likely the most straightforward approach to make those queries and then DISTINCT filter the results returned.

Would that work for you or do you have something more sophisticated in mind?

1 Like

yeah, it’s ok
just wondering is there more elegant way