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

Add --dynamicArgs option to generate operation arguments dynamically #363

Merged
merged 2 commits into from
May 6, 2022

Conversation

beepsoft
Copy link
Collaborator

Fixes #362 (Should be merged after #361)

Originally for any graphql operation with arguments every formal and actual
argument has been generated into the corresponding function in
RootStore.base.ts.

Using --dynamicArgs or setting in mst-gql.config.js dynamicArgs:true
will cause generation of operation functions, which will create graphql
operations, which only define those arguments, which have a matching
variable set in "variables". This dynamic argument generation solves issues
with Hasura mutations as well.

Originally for any graphql operation with arguments every formal and actual
argument has been generated into the corresponding function in
RootStore.base.ts.

Using --dynamicArgs=true or setting in mst-gql.config.js dynamicArgs:true
will cause generation of operation functions, which will create graphql
operations, which only define those arguments, which have a matching
variable set in "variables". This dynamic argument generation solves issues
with Hasura mutations as well.
@jesse-savary
Copy link
Member

@beepsoft could you sort out this merge error?

@beepsoft
Copy link
Collaborator Author

beepsoft commented May 3, 2022

Yes, I was expecting this, will fix soon.

# Conflicts:
#	generator/generate.js
@beepsoft
Copy link
Collaborator Author

beepsoft commented May 6, 2022

@jesse-savary does it merge now OK?

@jesse-savary jesse-savary merged commit 16a13b0 into mobxjs:main May 6, 2022
@jesse-savary
Copy link
Member

Yep @beepsoft

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

Successfully merging this pull request may close these issues.

In mutations include only arguments which have a value set in variables
2 participants