Comments (9)
Works great for me. Thank you denisgoryaynov.
Please strapi team, merge ! :)
from gatsby-source-strapi.
I opened a pull request to fix this issue #90
from gatsby-source-strapi.
Hi, I solved the problem making a fork of this project and changing the code inside src/normalize.js, you should see it in my account. It works and I've been using it on some projects at the company I work, but I still think that the localFile node is an ugly solution but currently that's the best I could come up with and I'm open to other ideas/improvements
from gatsby-source-strapi.
Hi, try deleting your cache using rm -rf .cache
inside your project. Also the master branch of my fork is missing the build files required for this library to work (I don't want to pollute the main branch). I made a second branch called "build" with these files, so if you are using npm just add #build at the end of the repo url inside your package.json and run npm i
to update the files
from gatsby-source-strapi.
Hi @denisgoryaynov,
I'm developing a personal project using Strapi and Gatsby and I'm getting through this situation. I ended up not using gatsby-image , mapping the array images inside a tag and writing manually the Strapi url of the image, obviously this not a good solution since this will not work on the production environment.
It makes no sense using gatsby-images just for single images and leave array images out because of this. I would like to know where you change your code to be able to create the localFile node, thanks in advance!
from gatsby-source-strapi.
To be honest, I'm a newbie in programming. This is my first attempt on building a JAMStack web app so I think I will be learning a lot from you and the community. It is very surprising there is no support for multi-images objects on Gatsby since this is a pretty common feature.
It could be not the most elegant solution but is solving a situation that would be a common place for many starters on Gatsby and Strapi. I really appreciate your workaround and your quick response.
Many thanks!
from gatsby-source-strapi.
Every time I try to gatsby develop
after installing your gatsby-source-strapi repo all the Strapi's Content Types are inaccessible by GraphQL. This is the message:
TypeError: Cannot read property 'allStrapiArticle' of undefined
- gatsby-node.js:38 makeRequest.then.result
e:/wamp/www/@flaex_/app/gatsby-node.js:38:17
gatsby-node.js:38
result.data.allStrapiArticle.edges.forEach(({ node }) => {
Then all the GraphQL request fail e.g.
error GraphQL Error Encountered 11 error(s):
- Unknown field 'allStrapiLink' on type 'Query'. Source: document `FooterTemplate` file: `GraphQL request`
GraphQL request (3:9)
2: query FooterTemplate {
3: allStrapiLink {
^
4: edges {
There is something I'm missing here?
from gatsby-source-strapi.
Hi @denisgoryaynov. I followed your instructions and now all is working as expected.
When I was searching on the web for alternatives to solve this problem, I found this helper function in the gatsby-source-filesystem plugin. Basically is downloading the file and making available in the GraphQL schema. As far I can see, it is adding more complexity to this situation for non experienced devs like me. I'll sitck with your solution, thanks again for your help!
from gatsby-source-strapi.
any updates on this?
from gatsby-source-strapi.
Related Issues (20)
- Gatsby develop hangs for minutes on "Source and Transform Nodes" HOT 1
- Gatsby Source not fetching all locales date throwing an error
- Issue generating links for nested collection routes HOT 1
- Plugin doesn't update data when content on admin changes HOT 2
- Error: EPERM: operation not permitted, lstat HOT 2
- "Rich text" field makes a ERROR #11321 PLUGIN HOT 1
- How to fetch custom API HOT 4
- image from strapi component doesn't show up in graphql HOT 3
- Single Types don't update on rebuild if multiple locales exist HOT 1
- Missing images from richtext field HOT 1
- Image Processing in HTML code HOT 2
- Plugin is not pulling data from Strapi when there is a timestamp on the cache. HOT 1
- ERROR #11321 PLUGIN "gatsby-source-strapi" threw an error while running the sourceNodes lifecycle: connect ECONNREFUSED ::1:1337 HOT 5
- Unable to make optional fileds. HOT 4
- CreateTypes Camel case vs. snake case HOT 1
- Is this plugin still maintained? HOT 31
- Getting "Unknown type" for the starter project HOT 2
- Cannot retrieve sub-components of components in graphql? HOT 13
- GatsbyImageData in dynamic zones HOT 2
- Pull plugin comments data into Gatsby HOT 1
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-strapi.