Project-Books / books-api

GraphQL Books API
https://project-books.github.io/#books-api
MIT License
35 stars 61 forks source link

Filter by language #155

Open knjk04 opened 2 years ago

knjk04 commented 2 years ago

Is your feature request related to a problem? If so, please describe. A user may only want to see their books in their chosen language (e.g. Spanish). Currently, we'd show all books that satisfy the query, regardless of the language.

Describe the solution you'd like For every GraphQL query, we should have an optional language argument.

Possible approaches:

Additional context

If you need help with anything, we'll be happy to help you over a GitHub Q&A discussion or our Slack workspace

gstamatiadis commented 2 years ago

Hello. Could I do this task? I have read the contributing guidelines. I think it will take about one week. My approach would be to write the appropriate query and the corresponding data fetcher.

acyuta1 commented 2 years ago

Hey Karan @knjk04,

I can take this up. Should be a straightforward one.

Approach:

  1. Request would contain an optional 'lang' param.
  2. I feel, filtering the result set is a better option since a where clause in a query seems unnecessary.

Please let me know if this looks okay! Looking forward to your reply.