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

Custom APIs #488

Open
bedeho opened this issue May 11, 2022 · 4 comments
Open

Custom APIs #488

bedeho opened this issue May 11, 2022 · 4 comments

Comments

@bedeho
Copy link
Member

bedeho commented May 11, 2022

Background

Sometimes we want some API feature which either is not present, or is too slow, and we have to either make complex changes to Hydra to accomodate some edge case - which typically requires some long delay, or we have to start doing hacky workarounds.

Proposal

Implement something like this https://docs.subsquid.io/reference/api-extensions.

But this is only worth doing if its super easy.

@dmtrjsg
Copy link

dmtrjsg commented Aug 17, 2022

Won't get to this until we migrate to subsquid

@bedeho
Copy link
Member Author

bedeho commented Aug 17, 2022

Why tho? I think this is pretty much child's play, and has big impact, am I wrong about either premise?

@dmtrjsg
Copy link

dmtrjsg commented Aug 17, 2022

@kdembler @zeeshanakram3 @thesan pls feel free to chime in.

@zeeshanakram3
Copy link
Contributor

zeeshanakram3 commented Aug 17, 2022

Certainly, custom resolvers(APIs) would save us from hacky solutions, but now we have workarounds for things where we felt the need for something not generated by templated hydra resolvers. So for new mappings, if we feel the need for this, we may use it.

Also, Subsquid has builtin support for adding custom resolvers, but the steps described in https://docs.subsquid.io/query-squid/api-extensions do not seem to apply to the current version of Hydra; however, with some tweaks, we can achieve that, maybe write a script to serve the unified view of custom + generated query resolvers.

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

No branches or pull requests

5 participants