dipdup-io / dipdup

Modular framework for creating selective indexers and featureful backends for dapps
https://dipdup.io
MIT License
92 stars 52 forks source link

Use `query_root_fields` supporrted from Hasura 2.8.0 for granular control over root field permissions (_by_pk, _aggregate) #420

Closed 852Kerfunkle closed 1 year ago

852Kerfunkle commented 2 years ago

What feature would you like to see in DipDup? Hasura 2.8 recently added a convenient way to give permissions for the auto-generated _aggregate, _by_pk query root fields: https://github.com/hasura/graphql-engine/releases/tag/v2.8.0

Would be nice if DipDup would make these available when "allow_aggregations" is set to true (or maybe a new option "expose_query_root_aggregations").

Why do you need this feature, what's the use case? To count stuff on the top level.

852Kerfunkle commented 2 years ago

Well, it totally does work without it, but I got fooled by the hasura metadata sometimes not updating (#404). :)

Though the PR may still be worthwhile as a template for adding hasura version-specific things. Also this method (query_root_fields) allows convenient and granular control over select, select_aggregate and select_by_pk permissions.

droserasprout commented 1 year ago

See #421