GraphQL Query Fails With INTERNAL_SERVER_ERROR

The query keeps failing with the error
Request:

{
  metaobject(id:"gid://shopify/Metaobject/26780860486") {
    id
    type
    referencedBy(first:1) {
      edges {
        node {
          __typename
          name
          namespace
          referencer {
            __typename
          }
          target {
            __typename
          }
        }
      }
    }
  }
}

Response:

"errors": [
    {
      "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: f4e90ff1-5d90-476a-aad5-56143fb93cdd (include this in support requests).",
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "requestId": "f4e90ff1-5d90-476a-aad5-56143fb93cdd"
      }
    }
]

There is some problem with the “target” field:

Hi Igor,

Are you still seeing this issue? If so could you share a more recent requestId that I can investigate on our side?

Hi Liam!

Yeap, the issue is still being observed. Here is the latest responses:

{
  "errors": [
    {
      "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: b3bdc992-1eed-4e7e-a005-b71c6c405440 (include this in support requests).",
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "requestId": "b3bdc992-1eed-4e7e-a005-b71c6c405440"
      }
    }
  ]
}

{
  "errors": [
    {
      "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 4cee3082-32f3-4337-852a-29549721852b (include this in support requests).",
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "requestId": "4cee3082-32f3-4337-852a-29549721852b"
      }
    }
  ]
}

Without the ‘target’ parameter, it works fine.

It is related to the target parameter - I’m seeing here a bit more context on the error: “Cannot return null for non-nullable field MetafieldRelation.target” - what are you expecting the target parameter to return? I believe it should be one of these possible values, but it’s possible it’s not set up correctly ?

Thank you for the help and additional information about the error. Perhaps something is indeed set up incorrectly. I’ll try to figure it out.

Hi again Igor - from looking into this further, it actually seems like there is an issue on our side related to the list.metaobject_reference type. e’re working on a fix for this now.

Any updates on this? Tried to add a metafield on a Customer which references a list of metaobjects and got an internal server error. This happens both from my Hydrogen app and the Admin GraphIQL, so assuming it’s still an internal issue

Hacking around it by using string types for now (“single_line_text_field”)

My GraphQL:

# query
mutation MetafieldsSet($metafields: [MetafieldsSetInput!]!) {
    metafieldsSet(metafields: $metafields) {
      metafields {
        key
        namespace
        value
        createdAt
        updatedAt
      }
      userErrors {
        field
        message
        code
      }
    }
}

# variables
{
  "metafields": [
      {
        "key": "fine_tuned_model-01",
        "namespace": "fine_tuned_model",
        "ownerId": "gid://shopify/Customer/7696157344030",
        "type": "list.metaobject_reference",
        "value": "[gid://shopify/Metaobject/47298314526]"
        
      }
    ]
 }

Response:

{
  "errors": [
    {
      "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: ad41cd86-9931-4959-a3c5-0c682ebff3b6 (include this in support requests).",
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "requestId": "ad41cd86-9931-4959-a3c5-0c682ebff3b6"
      }
    }
  ]
}