Solved

Internal error building required inputs

agustinc
Shopify Partner
6 0 2

We started receiving an error on one of our test stores whenever we run this query on a subscription draft (Existing subscription being modified)

 

query subscriptionDraftShippingOptions(
$draftId: ID!
$deliveryAddress: MailingAddressInput!
) {
subscriptionDraft(id: $draftId) {
id
shippingOptions(deliveryAddress: $deliveryAddress) {
__typename
... on SubscriptionShippingOptionResultSuccess {
shippingOptions {
title
price {
amount
currencyCode
}
code
presentmentTitle
description
carrierService {
id
formattedName
}
}
}
}
}
}

 

The idea is to get the available shipping options for that subscription whenever we modify the items, but even if we don't perform any changes to the subscription, any time we run that query, the response we get is:

 

{
"message": "Internal error building required inputs.",
"locations": [
{
"line": 7,
"column": 5
}
],
"path": [
"subscriptionDraft",
"shippingOptions"
]
}

There's no other information, and it doesn't really matter what address we use, we always receive the same message

 

Also, it was working just fine last week

Accepted Solution (1)
JoshArnold
Shopify Staff
29 7 5

This is an accepted solution.

After looking into this, there are some product variants in your shop which have fields for the "weight_value" as null, when they should be defaulted to 0.0 or contain a valid value. I'm not sure how exactly this has happened, but if you look at the product variants on those subscriptions and perhaps set their weight to 0.1g as a test, then save them, and see if that resolves your GraphQL errors?

 

I will still report this as a bug needing improvements for both the error being raised and why values are being stored as null for weight instead of 0.0 to help prevent this issue in the future.

Josh (aka Master Chief) | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 3 (3)

JoshArnold
Shopify Staff
29 7 5

Hi @agustinc!

So sorry to hear you are experiencing this issue. Is it happening on any non-test stores for you as well? I can see the area of our code that would return this error and I'm looking into any recent changes that may have caused this. In the meantime, could you PM me a specific shop ID to help with my debugging? Thank you for your help and patience! 😊

Josh (aka Master Chief) | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

agustinc
Shopify Partner
6 0 2

So far, it seems that is affecting a single store. We tested on other test stores and are working just fine, but until we see the error on a non-test store we won't be sure. I'll send you the information now

JoshArnold
Shopify Staff
29 7 5

This is an accepted solution.

After looking into this, there are some product variants in your shop which have fields for the "weight_value" as null, when they should be defaulted to 0.0 or contain a valid value. I'm not sure how exactly this has happened, but if you look at the product variants on those subscriptions and perhaps set their weight to 0.1g as a test, then save them, and see if that resolves your GraphQL errors?

 

I will still report this as a bug needing improvements for both the error being raised and why values are being stored as null for weight instead of 0.0 to help prevent this issue in the future.

Josh (aka Master Chief) | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog