Open adityakoushik11 opened 2 years ago
If i try to fetch posts through API, then i am getting the response
https://www.ionicfirebaseapp.com/blogs/ghost/api/v4/content/posts/?key=
I'm having the same problem
having the same issue, tried 2 clean installs of Gatsby 4 and Ghost 5 and works initially with the "apiUrl": "https://gatsby.ghost.io",
, as soon as I point it to the newly installed Ghost local install, it doesnt fetch anything..
Not sure whats going on..
When i try to connect my gatsby site to ghost API, i am getting posts data as empty array even if i have published posts from ghost cms.
The graphql query i have used to fetch posts is
query GhostPostQuery{ allGhostPost( sort: { order: DESC, fields: [published_at] } ) { edges { node { id title slug } } } }
I have also attached the screenshot of the query and its response.PACKAGE JSON : ` { "name": "spet-gatsby", "private": true, "description": "Spet - Gatsby React IT & Business Startup Template", "version": "0.1.1", "author": "EnvyTheme.com", "dependencies": { "@loadable/component": "^5.15.0", "animate.css": "^4.1.1", "axios": "^0.24.0", "babel-plugin-styled-components": "^2.0.2", "dayjs": "^1.10.7", "dotenv": "^10.0.0", "gatsby": "^3.14.0", "gatsby-awesome-pagination": "^0.3.8", "gatsby-plugin-gatsby-cloud": "^2.11.0", "gatsby-plugin-image": "^1.14.0", "gatsby-plugin-manifest": "^3.14.0", "gatsby-plugin-next-seo": "^1.9.0", "gatsby-plugin-offline": "^4.14.0", "gatsby-plugin-react-helmet": "^4.14.0", "gatsby-plugin-sharp": "^3.14.0", "gatsby-plugin-sitemap": "^5.4.0", "gatsby-plugin-styled-components": "^5.4.0", "gatsby-source-filesystem": "^3.14.0", "gatsby-source-ghost": "^4.2.4", "gatsby-source-strapi": "^1.0.2", "gatsby-transformer-sharp": "^3.14.0", "prop-types": "^15.7.2", "react": "^17.0.2", "react-accessible-accordion": "^3.3.5", "react-dom": "^17.0.2", "react-feather": "^2.0.9", "react-helmet": "^6.1.0", "react-helmet-async": "^1.2.2", "react-markdown": "^7.1.1", "react-masonry-component": "^6.3.0", "react-owl-carousel3": "^2.2.5", "react-slick": "^0.28.1", "react-tabs": "^3.2.2", "sass": "^1.41.1", "styled-components": "^5.3.3" }, "devDependencies": { "path": "^0.12.7", "prettier": "2.2.1" }, "keywords": [ "gatsby" ], "license": "0BSD", "scripts": { "build": "npm run clean && gatsby build && node copy-redirects.js", "develop": "npm run clean && gatsby develop", "format": "prettier --write \"*/.{js,jsx,ts,tsx,json,md}\"", "start": "npm run develop", "serve": "gatsby serve", "clean": "gatsby clean", "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1" }, "repository": { "type": "git", "url": "https://github.com/gatsbyjs/gatsby-starter-default" }, "bugs": { "url": "https://github.com/gatsbyjs/gatsby/issues" } }
`