Can you use ghost as a headless CMS with a GraphQL endpoint?

There’s nothing officially in the documents that mention that Ghost can be used as a headless CMS that has its api accessed with GraphQL. The only thing I found was something with Gatsby? which I don’t know how to use and don’t need to use.

Is there a way to strictly get ghost to work as a headless CMS with GraphQL? All I want is to query data with a GraphQL query and just get data back. I don’t need html, images, static content, etc. Just data from a GraphQL query. Is this possible?

Hey @Don_Warren :wave:

The Ghost API is a REST API, meaning there are BREAD (browse, read, edit, add, delete) endpoints for most resources. If you wanted to use GraphQL with Ghost, you would have to write your own resolvers. Gatsby is a headless static site generator that has resolvers for reading data from multiple types of sources.

If you explain your usecase, we might be able to offer suggestions as to how to get there :slight_smile:

2 Likes

If you’re looking for a standalone GraphQL server - I created a project that provides an Apollo GraphQL server for Ghost. It supports querying of all Ghost resources from the Content API. I opened a thread for reviews here.