-
Notifications
You must be signed in to change notification settings - Fork 19
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
Feature: Endpoint to fetch item_hashes only #437
Comments
Two typical solutions here:
In any case, I would avoid having an endpoint dedicated to this specific problem. |
GraphQL API would definitely be a smooth solution. But one should also consider that many blockchain RPCs (Ethereum, Solana) have methods entirely dedicated to fetching signatures/hashes in high performance. This way we could also implement any optimizations for this endpoint, without impacting the implementation of the original endpoints. |
At the moment there's no such requirement in terms of performance/load. I think GraphQL would be great for frontend usages, but it can be a bit much to put in place if you're in a hurry. The header solution works fine and can easily have a default implementation for all endpoints (implemented as a aiohttp middleware) and have a custom implementation for Example of the middleware:
I still think GraphQL is worth a shot, to be discussed with @BjrInt and @hoh . |
Problem
For some use cases like caching and checking for new messages, fetching the whole message is too much.
Solution
Provide an endpoint for fetching messages, with the exact same query parameters, as the GET /messages endpoint. This should allow filters to be applied for any use case, especially getting the latest item_hashes up until some timestamp, to check for new messages.
The text was updated successfully, but these errors were encountered: