NestedTranslatableResources doesn't work for PRODUCT_OPTION_VALUE

I’m trying to use translatable resource with nestedTranslatedResource, is there a way to get production_option_value in one query ? or I need to go with some hacky methods ?

Here is my query that doesn’t get the product_option_value which I believe should be tied to production_option.

query translatedResource($resourceType: TranslatableResourceType!, $first: Int!, $after: String) {
  translatableResources(first: $first, resourceType: $resourceType, after: $after) {
    nodes {
      resourceId
      translatableContent {
        digest
        key
        value
        type
      }
      nestedTranslatableResources(resourceType: PRODUCT_OPTION, first: 5) {
        nodes {
          resourceId
          translatableContent {
            digest
            key
            value
            type
          }
          innerNested: nestedTranslatableResources(
            resourceType: PRODUCT_OPTION_VALUE
            first: 5
          ) {
            nodes {
              resourceId
              translatableContent {
                digest
                key
                value
                type
              }
            }
          }
        }
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

Variable

{
  "first": 5,
  "resourceType": "PRODUCT"
}

Hey @tic - :waving_hand: - looks like with the innerNested set, you’re creating an aliased second query on the nestedTranslatableResources object? Are you able to pull the right PRODUCT_OPTION_VALUE outputs when you run something like this?

query getTranslatableProductOptionValues {
  translatableResources(first: 10, resourceType: PRODUCT_OPTION_VALUE) {
    nodes {
      resourceId
      translatableContent {
        digest
        key
        value
        type
      }
    }
  }
}

I think in most GraphQL schemas, your flow would work, but just wanted to make sure I’m looking at the problem correctly before I investigate further to see if this is a potential issue on our end - hope to hear from you soon!

@Alan_G Thank you for checking this out. Yes I’m only creating an alias, I could as well just leave it as nestedTranslatedResources, doesn’t work either.

And as regards your second question, yes I’m able to access the PRODUCT_OPTION_VALUE directly, but the issue is, without it been tied to a PRODUCT_OPTION which is then Tied to a PRODUCT it’s not that useful.

Hence the reason for having a double nestedTranslatedResources.

It’s good to also note that I could only pull PRODUCT and PRODUCT_OPTION and for PRODUCT_OPTION_VALUE I get back empty nodes

Thanks @tic for the clarifications here. I’ll do a bit more digging on my end to see if we can narrow down what the issue might be/if it’s expected behaviour. I’ll loop back with you here once I have more info :slight_smile: