Skip to content

ENSv2 GraphQL API: *Connection.totalCount #1692

@shrugs

Description

@shrugs
  • the totalCount field is pretty useful in a lot of contexts, but they definitely need it for subdomains and i hate the Domain.subdomainCount ergonomics
  • but pothos was being pretty shitty about being able to inject this correctly, since it doesn't provide the domain as parent (??) and only provides the connection object as parent (??) so what we actually need to do is probably more like "in the main connection resolver, if totalCount is selected, execute db.$count(domains) and return
  • totalCount in a Relay-style connection should reflect the filters applied to the connection, but ignore pagination arguments (like first, last, after, before)
  • replace Domain.subdomainCount with Domain.subdomains.totalCount

Metadata

Metadata

Assignees

Labels

ensapiENSApi related

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions