Support for external CMSs

Hi everyone,

I’m interested to use RedwoodJS with external CMSs, for instance Sanity as in this article: RedwoodJS with Sanity.io CMS as Backend - DEV Community

At the moment, I’m using DatoCMS and would love to migrate my codebase to RedwoodJS but keep my content at the same place.

Is such a feature already available? Did someone tried something with other headless CMSs using GraphQL?

Hey @fredmontet

I don’t see why it wouldn’t be possible. We have a concept called “services” as a way to specify resolvers for your GraphQL schema.

In our tutorial we fetch data from Prisma, but the data can come from anywhere. So… if DatoCMS has an api then you can create a service that retrieves your content from them and make it available via a GraphQL field.

If you do not wish to create GraphQL types for the payload returned from DatoCMS you can create a JSON field type and simply return the result from DatoCMS.

Thanks @peterp!

I did a POC with a couple services and it indeed works perfectly.

Also, in order to avoid remaking the schema of each ressource, I tried another way: to change the GraphQL client used by the RedwoodProvider so that it uses DatoCMS but struggled a bit, mainly because DatoCMS asks for an auth token.

Do you have any suggestions regarding this, or would it simply be better not to consider this?

This sounds super exciting! We have an open issue that’s related. Please feel free to add any relevant input you might have to that issue