hasura / ra-data-hasura

react-admin data provider for Hasura GraphQL Engine
MIT License
336 stars 70 forks source link

custom resource finder #127

Open fkowal opened 2 years ago

fkowal commented 2 years ago

Context: When doing CSV export It's quite common to have business requirements, to add some aggregate/external fields.

ie

shops + orders_aggregate { count }

I tried several approaches and one i'd like to enable

  1. <ExportButton resource="shops_with_orders_report" /> + buildField

where shops_with_orders_report is an "alias" that only exists in the application and the resource that will be used is the shops and a custom buildField will be provided and will decorate the shops data with extra gql { orders_aggregate { count }}