relate-app / gatsby-source-strapi-graphql

A Gatsby source plugin for building websites using Strapi as a data source
BSD Zero Clause License
32 stars 9 forks source link

Not able to query publicURL on file #33

Closed CalebBarnes closed 2 years ago

CalebBarnes commented 2 years ago

Not able to query publicURL on file like in the readme. I'd assume this file should be stored locally in the gatsby site instead of having to access it from the backend URL.

query MyQuery {
  strapiHomePage {
    hero {
      headline

      videos {
        id
        mime
        url
        name
        file {
          publicURL
          url
        }
      }
    }
  }
}

result:

 "message": "Cannot query field \"publicURL\" on type \"File\".",

image

CalebBarnes commented 2 years ago

I added gatsby-source-filesystem to my gatsby config and now it's working! Might be good to have in the readme.