drupal-graphql / graphql-views

11 stars 18 forks source link

How to pass multiple values to contextual filter? #34

Open tmsss opened 4 years ago

tmsss commented 4 years ago

I have a view that accepts multiple arguments that correspond to taxonomy term IDs. How could I create a query that accepts an array of values in a contextual filter?

drewble commented 4 years ago

I could also use this info.

drewble commented 4 years ago

@tmsss You can pass multiple values by enabling Allow Multiple Values on your contextual filter and passing the values to the query as "a, b, c" for AND and "a + b + c" for OR.

However, I think it would be preferable overall if the this module supported arrays as arguments and the schema expected [String] instead of String.