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

Add option to query count for 'countable' tables field to 'default' gql query #3754

Open
connoratrug opened this issue May 16, 2024 · 0 comments
Labels

Comments

@connoratrug
Copy link
Contributor

Is your feature request related to a problem? Please describe.
When fetching relational/graph data to display is there may be the need to show the number of items for a 'countable' field. For example when viewing the list of variables it might be relevant to show the number of repeats.

Describe the solution you'd like

  Variables({
    name
    repeats {
       _count
    }
  }

should return
[{ name: 'foo', repeats: { _count: 3} }]

only countable field should be allowed to contain a '_count ' if a '_count is added no other ( non agg ) fields can be requested

Describe alternatives you've considered

  • Fetching all rows and counting the result, down side; slow and in case of large sets max length might be research
  • Other query layouts may be possible

Additional context
Move towards optional stronger query syntax ( filter and agg at the field level) instead of different query types ( _agg, groups_by, ..)

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