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

A simpler way to add logic for filtering with logical operators #552

Open
frederikhors opened this issue May 31, 2022 · 1 comment
Open
Labels

Comments

@frederikhors
Copy link

I'm using GraphQL in Golang with gqlgen and Bun as ORM.

I'm using DDD and Clean architecture, meaning that I'm avoiding one-size-fits-all/lock-in solutions like Hasura, Postgraphile, DGraph and everything like that; I can (and I eventually will, no hurry) write and organize my code in such a way to achieve their features.

For now I'm wondering about complex queries with filters like: AND, OR, NOT (better described here).

Right now I need to think/write/test code all by myself and this certainly does not speed up production of the software I want to write.

Also, my code will almost certainly be slow, buggy and possibly all wrong as soon as I realize that I will need something extra for this feature.

After all, this is true for all software and is one of the reasons why open source was born.

After some research I noticed there are two approaches to solving the problem of GraphQL data filtering:

QUESTIONs

  1. What do you think if in Bun we already offer some facilities to avoid manually writing the code for this problem using .WhereGroup(), .Where() and .WhereOr()?
  2. Or at least we can update the docs with simple but also complex examples
Copy link

github-actions bot commented Nov 7, 2024

This issue has been automatically marked as stale because it has not had activity in the last 30 days. If there is no update within the next 7 days, this issue will be closed.

@github-actions github-actions bot added the stale label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant