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

Reminder to fix return type of resolver query #46

Open
dev8723 opened this issue Aug 6, 2023 · 0 comments
Open

Reminder to fix return type of resolver query #46

dev8723 opened this issue Aug 6, 2023 · 0 comments

Comments

@dev8723
Copy link
Contributor

dev8723 commented Aug 6, 2023

Return type is definitely not all SimulateResponse here

#[derive(QueryResponses)]
#[cw_serde]
pub enum QueryMsg {
    #[returns(SimulateResponse)]
    SimulateQuery(SimulateQueryMsg),
    #[returns(SimulateResponse)]
    QueryValidateJobCreation(QueryValidateJobCreationMsg),
    #[returns(SimulateResponse)]
    QueryHydrateVars(QueryHydrateVarsMsg),
    #[returns(SimulateResponse)]
    QueryResolveCondition(QueryResolveConditionMsg),
    #[returns(SimulateResponse)]
    QueryApplyVarFn(QueryApplyVarFnMsg),
    #[returns(SimulateResponse)]
    QueryHydrateMsgs(QueryHydrateMsgsMsg),
}
#[cw_serde]
pub struct SimulateResponse {
    pub response: String,
}

some of them are returning string, some returning Vec<CosmosMsg>, setting it incorrectly might not break the query, but i think it will mess up the generated json schema and typescript client.

@dev8723 dev8723 changed the title Fix return type of resolver query Reminder to fix return type of resolver query Aug 6, 2023
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

No branches or pull requests

1 participant