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

Order by nested relation #145

Closed
matthewlilley opened this issue Jul 10, 2022 · 2 comments
Closed

Order by nested relation #145

matthewlilley opened this issue Jul 10, 2022 · 2 comments

Comments

@matthewlilley
Copy link

matthewlilley commented Jul 10, 2022

a (orderBy: b.value) {
  b {
    value
  }
}

I assume this is limitation with GraphQL, and/or implementation of it by The Graph, since I'm unable to do a simple orderBy: b.value

Have any suggestions here? I wonder if we can work around this with graph client since not being able to order by a property nested 1 level deep seems silly...

Sorry to tag but I'm sure you work some magic @ardatan

@dotansimha
Copy link
Collaborator

dotansimha commented Jul 10, 2022

At the moment you can only override the resolver and implement your own login to filter by the entities:
https://www.graphql-mesh.com/docs/guides/extending-unified-schema#programatic-additionalresolvers

We recently got this PR merged in graph-node: graphprotocol/graph-node#3184 (it's currently in testing, we expect this to be available to use very soon! this is a part of a bigger work we are doing to improve the GraphQL schema provided by The Graph)

@matthewlilley
Copy link
Author

matthewlilley commented Jul 10, 2022

At the moment you can only override the resolver and implement your own login to filter by the entities: https://www.graphql-mesh.com/docs/guides/extending-unified-schema#programatic-additionalresolvers

We recently got this PR merged in graph-node: graphprotocol/graph-node#3184 (it's currently in testing, we expect this to be available to use very soon! this is a part of a bigger work we are doing to improve the GraphQL schema provided by The Graph)

Amazing! Thanks for the heads up on this one. I'll do something scrappy for now until this is in the wild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants