Open Aleksi44 opened 3 years ago
Hey, nice job this plugin for gatsby :)
I get an empty body [] on my TestTemplate when I use Wagtail Preview. The slug that I receive in my graphql query seem to be not correct.
export const query = graphql` query Test($slug: String) { wagtail { page(slug: $slug) { seoTitle seoDescription lastPublishedAt ... on TestPage { body { ... on MyTextBlock { blockType text } ... on MyImageBlock { blockType image { url title } } } } } } }
When I write the slug of my page directly in the code, it works.
export const query = graphql` query { wagtail { page(slug: "perfect") { seoTitle seoDescription lastPublishedAt ... on TestPage { body { ... on MyTextBlock { blockType text } ... on MyImageBlock { blockType image { url title } } } } } } }
I don't know if it's my wagtail preview configuration or a bug. I created a repo here.
Do you know what I'm doing wrong?
I finally used a custom preview with gatsby-plugin-graphql-preview and a redirect on my wagtail page.
gatsby-plugin-graphql-preview
This custom preview suppress these issues :
I created a repo here.
I leave this issue open if it can help anyone. Feel free to close it.
Hey, nice job this plugin for gatsby :)
I get an empty body [] on my TestTemplate when I use Wagtail Preview. The slug that I receive in my graphql query seem to be not correct.
When I write the slug of my page directly in the code, it works.
I don't know if it's my wagtail preview configuration or a bug. I created a repo here.
Do you know what I'm doing wrong?