Is it possible to install multiple script tags in one GraphQL mutation?
I need to install two scripts when a merchant installs my app.
Is it possible to install multiple script tags in one GraphQL mutation?
I need to install two scripts when a merchant installs my app.
Hi @buildpath
This is obviously a different problem as it’s two of the same mutation, rather than two different kinds of mutation in one request, but you might be able to use an alias and just add both mutations in the body of the request similar to @djhamilton 's answer here
Example from thread:
mutation batchProductUpdates(
$input: ProductVariantInput!
$inventoryItemId: ID!
$locationId: ID!
$available: Int
) {
productVariantUpdate(input: $input) {
product { id }
productVariant { id price }
}
inventoryActivate(
inventoryItemId: $inventoryItemId
locationId: $locationId
available: $available
) {
inventoryLevel { id available }
}
}
Thank you! I’m not familiar enough with GraphQL yet to find my solution in that code, so I’m not sure if i can mark as a solution. However, thanks for your reply!