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

Chore/revert client #3

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4d67923
Lint react-query
adairrr Sep 27, 2022
b7a2bbb
Allow the user to generate a query factory
adairrr Sep 27, 2022
1e700d5
Add factory snapshots
adairrr Oct 20, 2022
fca2414
Add query factory questions
adairrr Oct 20, 2022
7dcdf7f
Update vectis factory test
adairrr Oct 20, 2022
79e4190
Update react-query ts-codegen readme with queryFactory
adairrr Oct 24, 2022
97d14be
Merge pull request #74 from adairrr/feature/queryFactoryRebased
pyramation Oct 26, 2022
844a4c5
readme
pyramation Oct 26, 2022
e58a660
chore(release): publish
pyramation Oct 26, 2022
3fa99de
noImplicitOverride option
pyramation Nov 9, 2022
2bc52c7
tests
pyramation Nov 9, 2022
058bdfb
readme
pyramation Nov 9, 2022
bff0e40
Merge pull request #79 from CosmWasm/feat/overrides
pyramation Nov 9, 2022
ef4b391
chore(release): publish
pyramation Nov 9, 2022
7b684a9
readme
pyramation Nov 9, 2022
390e1a9
chore(release): publish
pyramation Nov 9, 2022
5a6c59c
readme
pyramation Nov 17, 2022
2c1947c
chore(release): publish
pyramation Nov 17, 2022
d6c1ef8
Option<Thing> Nullable fix
pyramation Nov 18, 2022
a95d47c
Merge pull request #83 from CosmWasm/fix/nullable
pyramation Nov 18, 2022
9135105
chore(release): publish
pyramation Nov 18, 2022
0c1b60e
Expand the referenced types for react query mutations
adairrr Nov 25, 2022
4591946
Format
adairrr Nov 25, 2022
60b120d
Merge pull request #85 from adairrr/fix/reactQueryMutationMsgType
pyramation Nov 25, 2022
4d78cf7
react-query
pyramation Nov 25, 2022
9724a27
chore(release): publish
pyramation Nov 25, 2022
e87d9f0
fixtures
pyramation Nov 26, 2022
1530f4e
Re-add missing StdFee and Coin imports to react query mutations
adairrr Nov 28, 2022
c37624a
Merge pull request #86 from adairrr/fix/missingRQImports
pyramation Dec 2, 2022
cffa2ac
chore(release): publish
pyramation Dec 2, 2022
bc18570
update package name
mayoreee Jan 28, 2023
d9c3e21
Merge branch 'main' into chore/revert-client
mayoreee Jan 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@

import { UseQueryOptions, useQuery, useMutation, UseMutationOptions } from "@tanstack/react-query";
import { ExecuteResult } from "@cosmjs/cosmwasm-stargate";
import { StdFee } from "@cosmjs/amino";
import { AdminAddrResponse, CodeIdResponse, CodeIdType, Uint128, Binary, CreateWalletMsg, Guardians, MultiSig, Coin, Cw20Coin, ExecuteMsg, Addr, ProxyMigrationTxMsg, WalletAddr, CanonicalAddr, RelayTransaction, FeeResponse, GovecAddrResponse, InstantiateMsg, QueryMsg, WalletQueryPrefix, Duration, StakingOptions, WalletInfo, ContractVersion, WalletsOfResponse, WalletsResponse } from "./Factory.types";
import { FactoryQueryClient, FactoryClient } from "./Factory.client";
export interface FactoryReactQuery<TResponse, TData = TResponse> {
6 changes: 5 additions & 1 deletion packages/wasm-ast-types/src/react-query/react-query.ts
Original file line number Diff line number Diff line change
@@ -407,16 +407,20 @@ export const createReactQueryMutationArgsInterface = ({
)
];

const msgType = createTypedObjectParams(context, jsonschema).typeAnnotation as unknown as t.TSTypeAnnotation
const msgType = createTypedObjectParams(context, jsonschema)?.typeAnnotation

if (msgType) {
body.push(
t.tsPropertySignature(
t.identifier('msg'),
// @ts-ignore
msgType
));
}

context.addUtil('StdFee');
context.addUtil('Coin');

const optionalArgs = t.tsPropertySignature(
t.identifier('args'),
t.tsTypeAnnotation(