-
Notifications
You must be signed in to change notification settings - Fork 16
feat: Added primary indexes and GraphQL interface. #12
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initial comments from reviewing together; will continue this afternoon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what happened but I ended up with 18 comments
Great work, no major comments 🙌 🎉
6b2856a
to
01ff43f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great 💯
The feature is amazing, I really love it -- it's something I will actively use for all of my projects / clients.
The only thing that we need to change (keep) is the ability to keep lookups using transaction hashes, because it's a critical feature. I am completely in favor of having an index that maps hashes to the block number / tx index, but the ability to ask the indexer for the transaction result using a tx hash needs to stay.
Thank you for adding this feature, and for optimizing the way we utilize pebble - it was a joy to read 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for resolving the convos, now the functionality is air tight 💯
- Added graphQL API using 99designs/gqlgen. Really easy to use interface throught GraphQL playground, with a ton of extra documentation explaining all the Query functions and filter parameters. - Store Transactions by block height and index, making them queriable - Added a ton of special encoders on storage/encode.go. They are intended to be used as a fast, sortable way to encode/decode keys on any key/value store. That allows us to use advanced features when iterating keys, like adding upper and lower keys as limiters, or in the future adding secondary indexes. - BREAKING CHANGE: I had to change prefixes on pebble keys to make them queriable, so previous db states are invalid. - Added BlockIterator and TxIterator to Reader storage interface. Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
c2cdb79
to
05edf24
Compare
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
Easy, standard, graphQL API with documentation:
Easy filtering and data querying:
Subscriptions!: