Reputation: 1565
Is it possible with gatsby to render some external data server side to have prepopulated content when accessing page with browser?
I found something regarding graphQL(iam not familiar with it) that it is able to query data also for server side rendering.
But how to achieve my needs using simple text/json response from external endpoint?
Upvotes: 0
Views: 1895
Reputation: 301
If a plugin exists to pull data from your source of choice, then you can pull it in and use GraphQL to query it.
https://www.gatsbyjs.org/docs/plugins/
If it doesn't, you'll want to write a plugin to pull data or use the sourceNodes
API in your gatsby-node.js
file.
https://www.gatsbyjs.org/docs/node-apis/#sourceNodes
Upvotes: 0