Comments (4)
Hey @akalogiros, the problem you are running into is likely due to the fact that Gatsby takes the data it gets from your main config query and puts it in it's own data layer.
Because of this, the query you have to use in your app's code differs from what you would normally use when querying GraphCMS endpoint directly.
You can access localhost:xxxx/___graphql
to see what gatsby did with the data from your endpoint and how to query for it.
from gatsby-source-graphcms.
Hello @hmeissner,
thanks a lot for your input.
I tried to do this over localhost:xxxx/___graphql
but problem persist.
on the contrary when i am bulding my site with gatsby develop
i can see in the command line that my data are correctly retrieved
the error according localhost:xxxx/___graphql
is at line allCurrentEvents
& aAllPastEvents
and its says Cannot query field allCurrentEvents on type rootQueryType
from gatsby-source-graphcms.
Yes this is all perfectly normal. You can see that Gatsby's graphiql is highlighting your queries as non-existent in the created API. You have to open up the docs on the right hand side in graphiql and look at how your data has been added to Gatsby. Then construct your queries according to that generated shape.
The data you added is probably structured by Gatsby in a way that's accessible within your app using a query like this:
query SiteTitleQuery2 {
allCurrentEvents{
edges {
node {
tip
}
}
}
}
from gatsby-source-graphcms.
Closing this as that does not seem to be in issue with the plugin itself. Will reopen this if it turns out otherwise. If you have any more problems with this @akalogiros please PM me on our community Slack.
from gatsby-source-graphcms.
Related Issues (20)
- Assets and localizations HOT 2
- Previous and next navigation for posts filtered by Category in Gatsby project not working HOT 3
- [gatsby-source-graphcms]: Problem building GraphCMS nodes // Error: Bad Request HOT 1
- Dependency Dashboard
- on upgrading to Gatsby 4 return null on build HOT 9
- When build website get the following error "Cannot query field "allGraphCmsPost" on type "Query"" . HOT 2
- Problem building GraphCMS nodes when upgrading to Gatsby v4 HOT 8
- Local images are null on gatsby build, but correct in dev mode (Gatsby v4) HOT 36
- Make a note on Granular Permissions usage
- concurrency error HOT 2
- gatsbyImageData return a wrong structs for some images HOT 1
- Markdown nodes null in production HOT 8
- Add ability to serve images in Webp format HOT 5
- Update baseURI to 'https://media.graphassets.com'
- Gastby build - connect ETIMEDOUT HOT 4
- Gatsby V2 fails to build fragments when model has nested components
- Locales not working through relations HOT 1
- [Updated] How can I identify a referenced component's type? HOT 6
- Error: Too Many Requests HOT 11
- Gatsby 5 support? HOT 9
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-graphcms.