Answers.Body: <p>When you enter live preview in the cp, it's an iframe to the URL you've set up for that section, including a <code>token=xxxxxxxx</code>, you need to pass this along to your GraphQL (assuming that's what you use), to let it know it's not supposed to fetch data from the database.</p>
  
  <p>Andrew Welch has a bit more info about it here: <a href="https://nystudio107.com/blog/headless-preview-in-craft-cms" rel="nofollow noreferrer">https://nystudio107.com/blog/headless-preview-in-craft-cms</a></p>
  
  <p>As well as another question here (based on vue, so you probably need to change som stuff for Gatsby): <a href="https://craftcms.stackexchange.com/questions/22045/live-preview-using-vue-js/31039">Live preview using Vue.js</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-22T19:00:03.610Z
Answers.Text: How should I configure the frontend application url on craft? I'm trying to do this, but I didn't find a way so far. The frontend application is already looking for a token parameter to send it back on graphql requests. Could you help me on this?
Answers.UserDisplayName: William Luis Alberton
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-21T12:07:42.737Z
Answers.LastActivityDate: 2020-01-21T12:07:42.737Z
Answers.UserDisplayName: peirix
Body: <p>How do you set up live preview for headless Craft CMS installs connected to Gatsby?</p>
  
Tags: <config><live-preview><headless>
Title: How do you set up live preview for headless Craft CMS installs connected to Gatsby?
ThreadText: # How do you set up live preview for headless Craft CMS installs connected to Gatsby?
  
  (Asked by: username_0 on 2020-01-07)
  
  How do you set up live preview for headless Craft CMS installs connected to Gatsby?
  
  **Tags:** config, live-preview, headless
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-01-21. Score: 2
  
  When you enter live preview in the cp, it's an iframe to the URL you've set up for that section, including a `token=xxxxxxxx`, you need to pass this along to your GraphQL (assuming that's what you use), to let it know it's not supposed to fetch data from the database.
  
  Andrew Welch has a bit more info about it here: <https://nystudio107.com/blog/headless-preview-in-craft-cms>
  
  As well as another question here (based on vue, so you probably need to change som stuff for Gatsby): [Live preview using Vue.js](https://craftcms.stackexchange.com/questions/22045/live-preview-using-vue-js/31039)
  
  > **Comments:**
  > **username_2**: How should I configure the frontend application url on craft? I'm trying to do this, but I didn't find a way so far. The frontend application is already looking for a token parameter to send it back on graphql requests. Could you help me on this?  
  
  ---
  
  