afuh/rick-and-morty-api

Ability to give more than one option to filter option in graphql

MiracleUFO opened this issue · 0 comments

I used your GraphQL api in my project and it worked well and was fun to work on.

I think it would be better if filter options when querying characters can be an array of Strings or a String (which is what is currently implemented in your API.) An array of Strings will return characters with either of the options. For instance { gender: ["Male", "Female"] } returns characters who are either male or female. Something like this:

screenshot

I'd love this because my filters currently done with JavaScript filtering more resembles that it than just a String. And I think it is overkill to have to use JavaScript filters to achieve it. Usually graphql apis allow arrays as option params in this way.

My implementation using your graphql API is live here: https://bit.ly/rick-and-morty-search

Excellent work 🍸