[gatsby-transformer-json] multiple json files giving unexpected behaviour #34669
-
Preliminary Checks
DescriptionI'm using the
In
Reproduction Linkhttps://github.com/marceloverdijk/my-gatsby-site Steps to Reproduce... Expected ResultBased on the https://www.gatsbyjs.com/plugins/gatsby-transformer-json/ documentation I would expect to have a Actual ResultActually I only see a single Now if I query the files in GraphiQL I can see at least both files are recognized: Now either there is a bug or multiple collections (split over 2 files) are not supported. In the latter case I wonder if the documentation on https://www.gatsbyjs.com/plugins/gatsby-transformer-json/ is correct as the mention of If multiple collections are not supported is there another way to do this? EnvironmentSystem:
OS: macOS 12.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 8.3.2 - ~/.nvm/versions/node/v16.13.2/bin/npm
Languages:
Python: 2.7.18 - /usr/bin/python
Browsers:
Chrome: 97.0.4692.99
Firefox: 96.0.3
Safari: 15.2
npmPackages:
gatsby: ^4.6.0 => 4.6.0
gatsby-plugin-google-analytics: ^4.6.0 => 4.6.0
gatsby-plugin-react-helmet: ^5.6.0 => 5.6.0
gatsby-plugin-sass: ^5.6.0 => 5.6.0
gatsby-plugin-sitemap: ^5.6.0 => 5.6.0
gatsby-source-filesystem: ^4.6.0 => 4.6.0
gatsby-transformer-json: ^4.6.0 => 4.6.0
npmGlobalPackages:
gatsby-cli: 4.6.0 Config FlagsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi! You're overwriting the automatic If you're using this it should work: module.exports = {
plugins: [
`gatsby-transformer-json`
{
resolve: `gatsby-source-filesystem`,
options: {
path: `./src/data/`,
},
},
]
}; |
Beta Was this translation helpful? Give feedback.
Hi!
You're overwriting the automatic
typeName
generation by using this: https://www.gatsbyjs.com/plugins/gatsby-transformer-json/#configuration-optionsIf you're using this it should work: