Skip to content

Add forgeSubmit mutation as a client method#38

Merged
aalmazan merged 11 commits intomasterfrom
feature/add-forgesubmit
Aug 5, 2022
Merged

Add forgeSubmit mutation as a client method#38
aalmazan merged 11 commits intomasterfrom
feature/add-forgesubmit

Conversation

@aalmazan
Copy link
Copy Markdown
Contributor

@aalmazan aalmazan commented Aug 3, 2022

Adds a forge_submit() method to the client which will allow Webform submissions.

Usage:

anvil.forge_submit(
    forge_eid="EID_FROM_YOUR_WORKFLOW", 
    payload=dict(
        nameField="My name",
        otherTextField="Some other text"
    )
)

# or with JSON
anvil.forge_submit(json="""{ "forgeEid": "FROM_WORKFLOW", "payload": { "someField": "the data" } }""")

TODO:

  • Add forgeSubmit update(?) support
  • Add example
  • Add docs
  • Maybe easy way to get forge EIDs via CLI?

@aalmazan aalmazan marked this pull request as ready for review August 5, 2022 18:36
@aalmazan aalmazan requested review from benogle and newhouse August 5, 2022 18:36
@aalmazan aalmazan added the enhancement New feature or request label Aug 5, 2022
{
id
eid
payloadValue
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this resolvedPayload? It's the most useful / complete of the payload resolvers.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also feel free to add status or any other things you are using in the examples in there

@aalmazan aalmazan merged commit 91e2180 into master Aug 5, 2022
@aalmazan aalmazan deleted the feature/add-forgesubmit branch August 5, 2022 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants