Skip to content
This repository has been archived by the owner on Mar 4, 2023. It is now read-only.

Preview mode using plugin? #16

Open
johncherba opened this issue May 11, 2020 · 0 comments
Open

Preview mode using plugin? #16

johncherba opened this issue May 11, 2020 · 0 comments

Comments

@johncherba
Copy link

johncherba commented May 11, 2020

Hello,

I am trying to get Preview Mode to work pulling in Draft content from Kentico Kontent.

Here's what I have in the gridsome.config.js file:

plugins: [
		{
			use: '@meeg/gridsome-source-kentico-kontent',
			options: {
				deliveryClientConfig: {
					projectId: process.env.KENTICO_KONTENT_PROJECT_ID,
					previewApiKey: process.env.KENTICO_KONTENT_PREVIEW_API_KEY,
					globalQueryConfig: {
						usePreviewMode: true,
						useSecuredMode: false,
					},
					contentItemsDepth: 6,
				}
			}
		}

If I use usePreviewMode: true I get the following error:

TypeError: schemaComposer.get(...).hasInterface is not a function

If I flip it to usePreviewMode: false it runs in develop mode just fine, but does not pull in the preview api call. I was able to get preview text by using other api calls, etc. I tried this in two different projects and can not get it to work.

Does it work? If so, what am I not doing in the config to set it properly?

Thank you for your help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant