hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.17k stars 2.77k forks source link

V2 dynamic null queries #7110

Open galipmedia opened 3 years ago

galipmedia commented 3 years ago

I used to be able to have a dynamic category_id INT field, if I sent it null it would retrieve items from all categories and if I sent it an integer it would get items from that category. I have already seen in the release notes why this has been changed and it does make a lot of sense. However it is a bit annoying to have to write 2 queries in every case. Rather than having a 'dangerous' global switch it would be great to have some query type for this situation like 'Int_nullable' ... just a thought.

galipmedia commented 3 years ago

Or perhaps have 2 global switches one for queries/subscriptions and one for mutations (where its much more dangerous).