gatsby
gatsby copied to clipboard
Missing nodes on build
Preliminary Checks
- [X] This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
- [X] This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions
Description
After upgrading Gatsby it skips some nodes when running gatsby build
the nodes works in gatsby develop
.
Seems like this happens when the 'filter' and 'sort' command is combined.
When commenting out filter or sort the query works:
query productPageQuery(
$id: ID
$parentId: ID
) {
allCraftDesignsCategory(
filter: { entries: { elemMatch: { remoteId: { in: [$id, $parentId] } } } }
) {
nodes {
title
....
}
}
allCraftDocumentsAsset(
# filter: { entries: { elemMatch: { remoteId: { in: [$id, $parentId] } } } }
sort: { fields: [title, extension], order: [ASC, DESC] }
) {
nodes {
title
....
}
}
allCraftOptionsCategory(
#filter: {
# entries: { elemMatch: { remoteId: { in: [$id, $parentId] } } }
# enabled: { eq: true }
#}
sort: { fields: lft, order: ASC }
) {
nodes {
title
....
}
}
This works in Gatsby 3 not in gatsby 4.2.2.1:
query productPageQuery(
$id: ID
$parentId: ID
) {
allCraftDesignsCategory(
filter: { entries: { elemMatch: { remoteId: { in: [$id, $parentId] } } } }
) {
nodes {
title
....
}
}
allCraftDocumentsAsset(
filter: { entries: { elemMatch: { remoteId: { in: [$id, $parentId] } } } }
sort: { fields: [title, extension], order: [ASC, DESC] }
) {
nodes {
title
....
}
}
allCraftOptionsCategory(
filter: {
entries: { elemMatch: { remoteId: { in: [$id, $parentId] } } }
enabled: { eq: true }
}
sort: { fields: lft, order: ASC }
) {
nodes {
title
....
}
}
Reproduction Link
/
Steps to Reproduce
- Upgrading from Gatsby 3 to 4.2.2.1.
- run
gatsby build
Expected Result
Site gets all nodes
Actual Result
Not all nodes a imported
Environment
System:
OS: macOS 12.5.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.3.0 - ~/.nvm/versions/node/v16.3.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 8.3.0 - ~/.nvm/versions/node/v16.3.0/bin/npm
Browsers:
Safari: 15.6.1
npmPackages:
gatsby: ^4.0.0 => 4.22.1
gatsby-plugin-emotion: ^7.22.0 => 7.22.0
gatsby-plugin-gdpr-cookies: ^2.0.6 => 2.0.9
gatsby-plugin-image: ^2.22.0 => 2.22.0
gatsby-plugin-loadable-components-ssr: ^4.2.1 => 4.2.1
gatsby-plugin-netlify: ^5.0.1 => 5.0.1
gatsby-plugin-react-helmet: ^5.22.0 => 5.22.0
gatsby-plugin-sharp: ^4.22.0 => 4.22.0
gatsby-plugin-sitemap: ^5.22.0 => 5.22.0
gatsby-source-craft: ^3.0.0 => 3.0.0
gatsby-transformer-sharp: ^4.22.0 => 4.22.0
npmGlobalPackages:
gatsby-cli: 4.22.1
Config Flags
No response
Hi!
Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.
If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.
Thanks for using Gatsby! π
Hiya!
This issue has gone quiet. Spooky quiet. π»
We get a lot of issues, so we currently close issues after 60 days of inactivity. Itβs been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! πͺπ