Shopify flow runcode input error

query {
getProductVariantData {
id
sku
price
product {
id
title
}
}
} Yesterday, Run Code and GraphQL input executed successfully without any issues. Starting today, the workflow fails during GraphQL validation before the Run Code begins execution. error message as shown below

" Interface field Publishable.availablePublicationCount expected but ProductVariant does not provide it."

even below runcode input has same issue

query {
return {
order {
events {
… on CommentEvent {
rawMessage
}
}
}
}
}

That error is a bug we are working to fix, but it should not be causing the workflow to not activate.

You have some other error causing the activation problem.

    "__typename": "Exception",
    "exception_summary": "'Run Code' execution error",
    "exception_message": "TypeError: cannot read property 'inventoryItem' of null\nat if (!(li.variant.inventoryItem.id in committedInventoryByItem)) { (flow.js:47)",
    ],

The workflow is activating successfully—there is no activation problem.

As shown in the attached screenshot, the workflow reaches the Run Code step and fails there with:

Exception: 'Run Code' execution error

Separately, I had also reported the GraphQL validation error:


Interface field Publishable.availablePublicationCount expected but ProductVariant does not provide it.

which you confirmed is a known bug.

runcode input query shown below

{
getCurrentDatetime {
currentDatetime
}

initializeExecutionLog {
logJson
currentReturnRequest
}

return {
id
closedAt
reverseFulfillmentOrders {
reverseDeliveries {
deliverable {
… on ReverseDeliveryShippingDeliverable {
tracking {
number
}
}
}
}
}
returnLineItems {
… on ReturnLineItem {
quantity

    fulfillmentLineItem {

  originalTotalSet {
    shopMoney {
      amount
    }
  }

      lineItem {
        title
     variantTitle
        sku
      }
    }

  }
}

order {
  returnProcessingInputs {
    value
  }


   processingHistory {
value

}

  totalDiscountsSet {
    shopMoney {
      amount
    }
  }

  lineItems {
    title
    sku
    quantity

    variant {
      id
    }

    

    discountAllocations {
      allocatedAmountSet {
        shopMoney {
          amount
        }
      }

      discountApplication {
        ... on AutomaticDiscountApplication {
          title
        }

        ... on DiscountCodeApplication {
          code
        }

        ... on ManualDiscountApplication {
          title
        }

        ... on ScriptDiscountApplication {
          title
        }
      }
    }
  }
}

}
}

I can’t read that. I’m not sure why you have this in your runCode:

{
  getCurrentDatetime {
     currentDatetime
}

initializeExecutionLog {
  logJson
  currentReturnRequest
}