What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

GraphQL response with ID for non existing GenericFile

GraphQL response with ID for non existing GenericFile

MariaEshopGuide
Shopify Partner
7 1 2

Hi there.

In our custom app we have the case that for a specific file name the ShopifyAPI::GraphQL request responds with a success, although the file is not displayed in the shop.


The background is that we automatically transfer files to a store and check beforehand whether a file with the given file name already exists in the shop.


The system has been running stably for months, but we are now having problems with a specific file (or file name). We are sure that it is not the file itself (if we rename it, it works without problems).

Shopify support did not want to or could not help us here and could not give us any exact details about the file in question. Hence my question to you:

  • What are the possible reasons for this behaviour?
  • How can we otherwise determine that the file does not exist in the shop?

Here is the query we use:

 

      ShopifyAPI::GraphQL.client.parse <<-'GRAPHQL'
        query ($filename: String!){
          files(query:$filename, first:1){
            edges{
              node{... on GenericFile {
                  id
              }}
            }
          }
        }
      GRAPHQL

 

 

Thank you in advance

Replies 0 (0)