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

Feat(torii-grpc): support Events query #1567

Merged
merged 10 commits into from
Feb 29, 2024
Merged

Conversation

gianalarcon
Copy link
Contributor

@gianalarcon gianalarcon commented Feb 20, 2024

Closes #1420

Hi @broody Please check my Events query implementation. Waiting for your feedback

Copy link

codecov bot commented Feb 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 71 lines in your changes are missing coverage. Please review.

Project coverage is 69.81%. Comparing base (374f2bf) to head (445e359).
Report is 61 commits behind head on main.

Files Patch % Lines
crates/torii/grpc/src/server/mod.rs 0.00% 71 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1567      +/-   ##
==========================================
- Coverage   70.06%   69.81%   -0.26%     
==========================================
  Files         236      265      +29     
  Lines       22531    26718    +4187     
==========================================
+ Hits        15786    18652    +2866     
- Misses       6745     8066    +1321     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -45,6 +45,15 @@ message Entity {
repeated Model models = 2;
}

message Event {
// The event's hashed keys
bytes hashed_keys = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hashed_keys is really just for entities, for events I think only input needed is repeated bytes keys. This mirrors graphql query.

Copy link
Contributor Author

@gianalarcon gianalarcon Feb 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually message Event is used on the Response/output. OK, the output will display repeated bytes keys

crates/torii/grpc/proto/types.proto Outdated Show resolved Hide resolved
crates/torii/grpc/proto/types.proto Outdated Show resolved Hide resolved
@@ -84,10 +99,21 @@ message Clause {
}
}

message EventClause {
oneof event_clause_type {
HashedKeysClause hashed_keys = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, hashed_keys can be omitted. Probably EventClause is not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your reply. Gonna work on it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed on dcaa4e0

@gianalarcon gianalarcon changed the title Feat(torii-grpc): support Events query and subscription Feat(torii-grpc): support Events query Feb 26, 2024
@gianalarcon gianalarcon marked this pull request as ready for review February 26, 2024 16:58
Copy link
Collaborator

@broody broody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just ordering of results then I think we're good to go.

crates/torii/grpc/src/server/mod.rs Show resolved Hide resolved
crates/torii/grpc/src/server/mod.rs Show resolved Hide resolved
@gianalarcon
Copy link
Contributor Author

Just ordering of results then I think we're good to go.

Fixed on commit 7e09a0c

@broody broody merged commit 6a513fe into dojoengine:main Feb 29, 2024
11 of 12 checks passed
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

Successfully merging this pull request may close these issues.

[Torii] gRPC to support Events query
2 participants