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

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

Open
MiracleUFO opened this issue Aug 4, 2022 · 0 comments
Open

Comments

@MiracleUFO
Copy link

MiracleUFO commented Aug 4, 2022

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 🍸 ✨

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

1 participant