You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
partnerJson {
titleh1descriptionbackground {
id
}
content {
childMarkdownRemark {
html
}
}
clients {
titleurllogo {
id
}
}
}
}
/content - folder:
gatsby-config.json:
module.exports={siteMetadata: {title: `foobar`,description: `foobar`,author: `foobar`},plugins: [`gatsby-plugin-react-helmet`,`gatsby-plugin-offline`,{resolve: `gatsby-source-filesystem`,options: {name: `content`,path: `${__dirname}/content`}},{resolve: `gatsby-source-filesystem`,options: {name: `images`,path: `${__dirname}/src/images`}},`gatsby-plugin-sharp`,`gatsby-transformer-sharp`,`gatsby-plugin-catch-links`,`gatsby-transformer-remark`,`gatsby-transformer-json`,{resolve: `gatsby-plugin-manifest`,options: {name: `gatsby-starter-default`,short_name: `starter`,start_url: `/`,background_color: `#ffffff`,theme_color: `#000000`,display: `minimal-ui`,icon: `src/images/favicon.png`// This path is relative to the root of the site.}},`gatsby-plugin-sass`]};
Expected result
With Gatsby 2.1.39 I get this result, where the images get recognized as files and I could use them for gatsby-image (gatsby-transformer-sharp / gatsby-plugin-sharp).
With 2.2.2 I get this result, without having changed anything in my code:
{
"errors": [
{
"message": "Field \"logo\" must not have a selection since type \"String\" has no subfields.",
"locations": [
{
"line": 17,
"column": 12
}
]
}
]
}
I also changed my json and played around a little bit, used the same file outside of array context:
Description
Today I updated gatsby from 2.1.39 to latest 2.2.2, and now gatsby wont recognize some images as files anymore, only as strings.
After updating gatsby, I get this error now:
error GraphQL Error Field "logo" must not have a selection since type "String" has no subfields.
Steps to reproduce
This is my json file (partner.json):
My query:
/content
- folder:gatsby-config.json
:Expected result
With Gatsby 2.1.39 I get this result, where the images get recognized as files and I could use them for gatsby-image (gatsby-transformer-sharp / gatsby-plugin-sharp).
Actual result
With 2.2.2 I get this result, without having changed anything in my code:
I also changed my json and played around a little bit, used the same file outside of array context:
Test query:
The same image get recognized as file again:
Environment
I tried it on different Environments, some examples:
Works:
Works:
Dont work:
Dont work:
PS: I also made sure the file extensions are correct because of this issue #4123 I used other files and so on, didn't changed anything.
The text was updated successfully, but these errors were encountered: