Query service, add query filter for virtual fields and sortable
Prerequisites
- [x] Are you running the latest version(s)?
- [x] Did you check the debugging guide?
- [x] Did you check the FAQs and Discussions?
- [x] Are you reporting to the correct repository?
- [x] Did you search for an existing issue or pull request?
Description
We want a feature allow user to filter the virtual fields/entity's attributes when query, for example:
we want to sort authors by the amount of books written after a certain year
type Author @entity{
id:ID!
books: [Book]! @derivedFrom(field:"author")
}
type Book @entity{
id:ID!
author: Author!
year: Int!
}
- [x] add filter for connection fields
- [ ] make compute column sortable
Details
These details can help to reproduce the environment the issue is occurring
Local Environment: [You can get this information from executing subql version.]
Query Version: [What is the version of the query service?]
Indexer Version: [What is the version of the indexer service?]
Network Details:
- [Network]
- [Block height, a block height where the issue is happening]
- [Dictionary endpoint, if used]
Steps to Reproduce
- [First Step]
- [Second Step]
- [and so on...]
Example project: [A link to a minimal example that can reproduce the issue]
Expected behavior: [What you expected to happen]
Actual behavior: [What actually happened]
Any other information
Is there any other information you would like to add?
Useful tickets:
https://github.com/graphile/pg-aggregates/issues/25
https://github.com/graphile-contrib/postgraphile-plugin-connection-filter/issues/152
Waiting for help on https://github.com/graphile/pg-aggregates/issues/36