cover images returning null inconsistently from Docs
See original GitHub issueThe npmPackages:
gatsby: ^2.20.14 => 2.20.14
gatsby-cli: ^2.11.5 => 2.11.5
gatsby-image: ^2.3.2 => 2.3.2
gatsby-plugin-catch-links: ^2.2.1 => 2.2.1
gatsby-plugin-manifest: ^2.3.3 => 2.3.3
gatsby-plugin-offline: ^3.1.2 => 3.1.2
gatsby-plugin-prefetch-google-fonts: ^1.4.3 => 1.4.3
gatsby-plugin-react-helmet: ^3.2.1 => 3.2.1
gatsby-plugin-sharp: ^2.5.4 => 2.5.4
gatsby-plugin-styled-components: ^3.2.1 => 3.2.1
gatsby-plugin-typography: ^2.4.1 => 2.4.1
gatsby-remark-embed-video: ^2.0.1 => 2.0.1
gatsby-remark-images: ^3.2.2 => 3.2.2
gatsby-remark-responsive-iframe: ^2.3.1 => 2.3.1
gatsby-source-filesystem: ^2.2.2 => 2.2.2
gatsby-source-google-docs: ^2.0.0-beta.6 => 2.0.0-beta.6
gatsby-transformer-remark: ^2.7.1 => 2.7.1
gatsby-transformer-sharp: ^2.4.4 => 2.4.4
When gatsby develop
is run the Docs in a folder, each have a header, ‘Different first page’ is checked, all have an image, in a query not all images are returned:
"cover": {
"image": null
}
If I edit one of the Docs that has returned null
for the image and then run develop
that Doc may now return the data for the image, though now other Docs that returned an image before may now show in the query as null
. I cannot see that there is any pattern to this behaviour. Only that a change to what returns either, the image data, or a null, changes only if there’s been an edit or an addition of a new Doc. Running gatsby develop
builds the same number of complete images each time it’s run. I have also run gatsby clean
- this does not alter this behavior.
Example in GraphiQL: for the public Google folder
query MyQuery {
allMarkdownRemark(filter: {frontmatter: {page: {eq: "news"}}}, sort: {fields: frontmatter___year, order: DESC}, limit: 10) {
edges {
node {
frontmatter {
name
cover {
image {
childImageSharp {
fluid(maxWidth: 300) {
src
}
}
}
}
}
}
}
}
}
Returns: (these should all return the image)
{
"data": {
"allMarkdownRemark": {
"edges": [
{
"node": {
"frontmatter": {
"name": "Tony Luciani's \"The Dressmaker\" awarded 1st prize in the 10th International \"FIGURATIVAS 2019\" Painting & Sculpture Competition",
"cover": {
"image": null
}
}
}
},
{
"node": {
"frontmatter": {
"name": "Dr. Roberta Bondar Celebrates 27th Anniversary of Space Launch",
"cover": {
"image": {
"childImageSharp": {
"fluid": {
"src": "/static/96369c2d10bd5db831e4e649bbe18067/35801/google-docs-image-0d6acd37-3643-5107-9f42-0d6a82070b96.jpg"
}
}
}
}
}
}
},
{
"node": {
"frontmatter": {
"name": "Tony Luciani \"Inside My Head\" on CBC Radio",
"cover": {
"image": null
}
}
}
},
{
"node": {
"frontmatter": {
"name": "W. David Ward \"Eyes of Society: Art, Traditional Knowledge, and the Watchmen of Haida Gwaii\"",
"cover": {
"image": null
}
}
}
},
{
"node": {
"frontmatter": {
"name": "Shannon Craig Morphew: Featured in the Dulwich Picture Gallery's \"In View\" magazine",
"cover": {
"image": {
"childImageSharp": {
"fluid": {
"src": "/static/c49446a06709af5cb7f8690051fcdba3/9dc27/google-docs-image-84b6ba87-eb38-5a04-a9f1-b87710471aaf.jpg"
}
}
}
}
}
}
},
{
"node": {
"frontmatter": {
"name": "The Art of the Deal",
"cover": {
"image": {
"childImageSharp": {
"fluid": {
"src": "/static/c48a9a2c19722a9a43e32c0db0569c84/f836f/google-docs-image-5f658c01-c856-564c-8019-637d9cec7a81.jpg"
}
}
}
}
}
}
},
{
"node": {
"frontmatter": {
"name": "The Art of Salesmanship",
"cover": {
"image": {
"childImageSharp": {
"fluid": {
"src": "/static/383aa78c3dc0f0577654850811045a7b/f836f/google-docs-image-6998840a-0d40-5e3c-9959-6b2d10ab6d90.jpg"
}
}
}
}
}
}
},
{
"node": {
"frontmatter": {
"name": "A rare painting by Paul Kane sets a new record for Canadian Art",
"cover": {
"image": null
}
}
}
}
]
}
}
}
Thank you
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (6 by maintainers)
Top GitHub Comments
I will try to investigate this in the following weeks. For now, I can’t reproduce the issue. I will try with more covers
Fixed in
2.0.0-beta.9