Issue with translatableResources Query when searching MEDIA_IMAGE translations

I was trying to test the new media image translatable resources.

I could successfully fetch the first page of translatable resources. However, when I tried to fetch the subsequent page with the after cursor, I got the following error:

{
      "message": "Invalid cursor for current pagination sort.",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "translatableResources"
      ],
      "extensions": {
        "requestId": null,
        "code": "INTERNAL_SERVER_ERROR"
      }
    }

I then recreated the same query in a dev store in GraphiQL and got the same error:


I can assure you, that the cursor I am using is the very same I got back from the previous response.

When I do the exact same thing with a different resourceType (like PRODUCT), everything works as expected.

I know that this is just a release candidate of the 2025-10 version of the API, but we would still like to try to get this to work. We have several clients who wish to translate alt texts, and we would rather use the native approach, instead of some sketchy workarounds.

Has anyone ever come across a similar issue? This seems like an issue on Shopify’s side, though.

2 Likes

Hey @Tim_Stepanov, I’ll test here and see if I get the same error. Can you confirm if the hasNextPage is returning True? I want to be sure that it’s expected to have items after the cursor.

Can you also test and add reverse:true to see if that changes anything with your pagination?

UPDATE: I’m able to replicate and revers:true doesn’t change anything. I’ll look in to this and report back here when I know more.

Greetings.

While you have obviously already checked that for yourself, I will also confirm that here:

I did get hasNextPage = true on my first query. And honestly, even if I didn’t, I would expect to just get an empty list as a response instead of this error.

And I also tried various combinations with reverse = true but could not get anything to work.


If someone else runs into the same issue before this gets resolved, here is a workaround that helps:

Just fetch all images with the ā€˜files(query: ā€œmedia_type:imageā€)’ query; then use ā€˜translatableResourcesByIds’ to fetch the related translatable resources. This works but requires twice as many requests.

Hey @Tim, I have an update on this.

The pagination issue with MEDIA_IMAGE has been fixed by splitting it into more specific resource types. You can now use ARTICLE_IMAGE and COLLECTION_IMAGE as separate enum values in the TranslatableResourceType parameter.

Here’s how to query them:

query {
  translatableResources(resourceType: ARTICLE_IMAGE, first: 10) {
    edges {
      node {
        resourceId
        translatableContent {
          key
          value
        }
      }
      cursor
    }
    pageInfo {
      hasNextPage
    }
  }
}

The same structure works for COLLECTION_IMAGE. Both support proper cursor-based pagination with the after parameter, so you shouldn’t hit the ā€œInvalid cursorā€ error anymore.

You can see both enum values documented in the TranslatableResourceType reference.

Let me know if you run into any issues with this approach.

1 Like

You pinged the wrong Tim

@Tim_Stepanov

haha Sorry about that. Thanks for the correct tag Tim :slight_smile: