Implement Field Selection#61
Conversation
150e02a to
aa092ee
Compare
|
Here's the diff of the codegen output.🙌🧠🦜 |
d481511 to
5231c73
Compare
| } | ||
| ] | ||
| }, | ||
| "field_selection": { |
There was a problem hiding this comment.
Should we maybe add new configuration options in camel case?
There was a problem hiding this comment.
The discussion I had with Jason was that we should try and make the config the same as hypersync queries. Unfortunately casing is all over the place between languages/products. I think lets keep it copy/paste-able from a hypersync query.
| } | ||
|
|
||
| #[derive(Debug, Serialize, Deserialize, PartialEq, Clone, JsonSchema)] | ||
| #[serde(deny_unknown_fields)] |
|
|
||
| module Block = { | ||
| type selectableFields = { | ||
| {{!-- Selectable fields --}} |
There was a problem hiding this comment.
How about to include the comments in generated code?
There was a problem hiding this comment.
Can do, although it's more a note for the template.
| {{#each field_selection.block_fields as | field |}} | ||
| {{field.name.camel}}: _s.field("{{field.name.camel}}", {{field.res_schema_code}}), | ||
| {{/each}} |
There was a problem hiding this comment.
If there are no fields, it'll complain that nothing is returned from the function
There was a problem hiding this comment.
I've fixed it by adding a return type. So empty record is fine.
238f800 to
dcf53d8
Compare
Update evm schema
dcf53d8 to
5b71449
Compare
TODOs: