-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Simplify service requests #3581
Conversation
examples/crowd-funding/README.md
Outdated
applicationId: "$APP_ID_1" | ||
) } | ||
``` | ||
|
||
If you enter the `applications` query again, both entries will appear in the second wallet as |
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.
Mmm this looks outdated. I'll make another pass on the README files before landing the PR.
|
||
trace!("Query requested a new block with operations: {operations:?}"); |
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.
Maybe there should be a way for the user to tell the client that they do not want to create a new block, regardless of what the application returns.
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.
Yes we're certainly not going to auto-sign block proposals like this in the future but instead properly integrate with wallets.
let response = async_graphql::Response::new(hash.to_value()); | ||
Ok(serde_json::to_vec(&response)?) |
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'm not sure if this is really an improvement - sure the type is Vec<u8>
but it is a serialized JSON. If it can't be anything else I think the previous type was better b/c it more precisely defined how to handle the data. Right now callers have to read the docs, previously it was in the 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.
Actually, wouldn't it be more consistent to not return the block hash here, and instead return the response
from the QueryOutcome
, just like in line 903 above?
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.
Yes see the summary
Motivation
After #3217, we do not need to introspect service queries to applications.
Proposal
Note the assumption on JSON outputs could be relaxed if we stopped returning the hash of the certified block and return the query response instead. However, this is a breaking change so this should be a separate PR.
Test Plan
CI