Simple Mutation component that takes a button or link-wrapped button as it's trigger.
When loading, it disables the button.
On error, it toasts a snackbar with the error message.
You can pass a
variables object property,
or if all your variables properties are strings,
you can use the element's data attributes
When set, variable data attributes will be packed into an object property with the name of this property
As an attribute, can be a string of comma-separated query names
<mutation-element refetch-queries="QueryA, QueryB,QueryC"></mutation-element>
As a property, you can pass any legal
href attribute of the link trigger
Variable input nodes
Slotted trigger node
Called when the element is adopted to a document.
Called when one of the element's
name of the observed attribute
previous value of the attribute. null if it was nonexistent
current value of the attribute. null if removed.
Increments and returns the most recent mutation id.
Returns true when an ID matches the most recent mutation id.
Callback for when a mutation is completed.
Callback for when a mutation fails.
Define this function to determine the URL to navigate to after a mutation.
Function can be synchronous or async.
If this function is not defined, will navigate to the
href property of the link trigger.
url to navigate to