Solved

Live Preview feature with GraphQL API

  • 16 April 2023
  • 2 replies
  • 215 views

Badge

Hello!

 

I say this (here):

 

You can only use the Live Preview feature if your website is powered by Contentstack's REST APIs.

 

Are there any plans to support the Live Preview feature with the GraphQL API? Or is there some kind of technical limitation why this is not supported?

icon

Best answer by Victor Monsch 17 April 2023, 16:16

View original

2 replies

Hi Mauricio,

 

Adding GraphQL support for Live Preview is still being considered and we do not have a timeline for it at the moment.

As Live Preview makes use of the Content Management API REST endpoint, enabling Live Preview for GraphQL would mean having a GraphQL endpoint for our Content Management API.

 

Based on the high effort that would take and the relatively low demand from our users, we have not prioritized this.

This might come to change depending on feedback from our customers as we constantly re-evaluate our backlog to deliver the most value.

 

I hope this gives you some clarity as to when and why.

Have fun using Contentstack!

Hi Mauricio,

 

Adding GraphQL support for Live Preview is still being considered and we do not have a timeline for it at the moment.

As Live Preview makes use of the Content Management API REST endpoint, enabling Live Preview for GraphQL would mean having a GraphQL endpoint for our Content Management API.

 

Based on the high effort that would take and the relatively low demand from our users, we have not prioritized this.

This might come to change depending on feedback from our customers as we constantly re-evaluate our backlog to deliver the most value.

 

I hope this gives you some clarity as to when and why.

Have fun using Contentstack!

 

AFAIK the LivePreview functionality when editing content in the Contentstack GUI, the data to the LivePreview window is sent via iFrame postMessage, so factually it uses neither the Delivery or content management api.

Being able to view your changes in real time in that preview window is in my opinion the most valuable part, being to press a pen icon on the actual website to change content is much less so.

For my use case I don’t actually think that we require a GraphQL for the CM-API, just that the CD-API.

The GraphQL endpoint could very well either allow subscriptions or @live queries when the query is a preview one.

One of your competitors, Contentful offers preview mode via their GraphQL in a rather simple manner, as seen here:
https://www.contentful.com/developers/docs/references/graphql/#/introduction/previewing-content

Reply