-
Notifications
You must be signed in to change notification settings - Fork 3
chore: rename type_ fields
#318
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
base: develop
Are you sure you want to change the base?
Conversation
| @@ -56,6 +56,7 @@ pub struct EventFilter { | |||
| pub struct Event { | |||
| pub sending_module: Option<MoveModuleQuery>, | |||
| pub sender: Option<GQLAddress>, | |||
| // TODO thibault | |||
| pub type_: MoveType, | |||
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.
Did this one not need a #[cynic(rename = "type")]?
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 actually verified, that trailing underscores do not prevent the match against the schema. You can add as many as you want and it still works. Mapping fails however at compile-time if you prepend it or change the field name in any other way. Not sure this is documented well. We probably should still cynic-rename it just in case that doesn't work anymore at some point.
| @@ -134,7 +134,7 @@ pub struct MoveEnumVariant { | |||
| pub struct MoveField { | |||
| pub name: String, | |||
| #[cynic(rename = "type")] | |||
| pub type_: Option<OpenMoveType>, | |||
| pub type_tag: Option<OpenMoveType>, | |||
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.
| pub type_tag: Option<OpenMoveType>, | |
| pub open_move_type: Option<OpenMoveType>, |
?
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.
move_type is probably also fine. Looking at the other fields they are named very chill as well, so not sure it's necessary to be super correct here.
| pub struct Event { | ||
| pub sending_module: Option<MoveModuleQuery>, | ||
| pub sender: Option<GQLAddress>, | ||
| // TODO thibault |
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.
TODO
No description provided.