Comments (2)
Evidently 'Sanity' + query.name
is incorrect. It should be 'sanity'+query.name
camelCased. I.e. sanityMovies
.
from gatsby-source-sanity.
Hey there, @aronhoyer !
So, the final type
generated by the plugin is Sanity${capitalizeFirstLetter(query.name)}
, but when Gatsby creates the GraphQl schema, it generates sanity${capitalizeFirstLetter(query.name)}
and AllSanity${capitalizeFirstLetter(query.name)}
, so that's how you should access it! Take a look at the image below:
To avoid this confusion you can always use your own defined type
, just include type: Movies
in your query object and voilà! (this is what I've done with the home
query in the picture above)
PS: I've updated the documentation to ask people to investigate the GraphiQl interface (localhost:8000/___graphql) before using queries to understand the generated data structure, this might hopefully help you next time ;)
from gatsby-source-sanity.
Related Issues (20)
- Block Content list style is missing
- Dependency Dashboard
- Can't get GatsbyImageData from Image in Block element HOT 7
- Need to build from a previous export of the dataset
- GraphQLError: Runtime Object type "SanityImage" is not a possible type for "Image". when querying an array of images HOT 1
- Is the __node-manifests directory necessary for builds to run? HOT 3
- Planned support for Gatsby 5? HOT 5
- ERROR #11321 PLUGIN After update to 7.6.0 HOT 13
- getGatsbyImageData Unhandled Runtime Error HOT 2
- Include image filename with getGatsbyImageData
- SanityImageAsset options aren't passed to Gatsby-Plugin-Image HOT 4
- crash desk tool - Error: Cannot get the start point in the node at path [1] because it has no start text node. HOT 1
- Mux assets are not resolved when there's a cache
- Error building gatsby after updating to 7.7.0 HOT 14
- Null values in graphql HOT 1
- ID field for reference types is null in graphql HOT 2
- Not able to filter ImageAssets by MediaTag
- Gatsby Config requires definition for "apiHost"
- [Feature Request] Add support for perspectives in plugin options
- Error: Unable to serialize object as a key
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby-source-sanity.