diff --git a/components/FieldTypesList.jsx b/components/FieldTypesList.jsx index e94626c..c40e4bb 100644 --- a/components/FieldTypesList.jsx +++ b/components/FieldTypesList.jsx @@ -31,11 +31,11 @@ export function FieldTypesList({ data }) {
-
+
{fieldType?.featuredImage?.node && ( )}
-

+

{fieldType.title}

diff --git a/components/Layout.jsx b/components/Layout.jsx index 0a8f0a6..d277681 100644 --- a/components/Layout.jsx +++ b/components/Layout.jsx @@ -1,5 +1,5 @@ import { gql } from '@apollo/client' -import { flatListToHierarchical } from '@faustwp/core' +import { flatListToHierarchical, useFaustQuery } from '@faustwp/core' import clsx from 'clsx' import Link from 'next/link' import { useCallback, useEffect, useState } from 'react' @@ -13,8 +13,8 @@ import { SiteHeader } from '@/components/SiteHeader' import { SitewideNotice } from '@/components/SitewideNotice' import { collectHeadings } from '@/lib/utils' -Layout.fragment = gql` - fragment LayoutFragment on RootQuery { +export const LAYOUT_QUERY = gql` + query LayoutFragment { ...SitewideNoticeFragment ...PrimaryNavigationFragment ...DocsSidebarNavigationFragment @@ -75,10 +75,10 @@ function useTableOfContents(tableOfContents) { return currentSection } -export function Layout({ data, children, toc, title }) { +export function Layout({ node, children, toc, title }) { + const { sitewideNotice, primaryMenuItems, footerMenuItems, docsSidebarMenuItems } = useFaustQuery(LAYOUT_QUERY); let tableOfContents = toc && toc.length ? collectHeadings(toc) : [] - const primaryMenuItems = data?.primaryMenuItems ?? [] const primaryNavigation = primaryMenuItems?.nodes ? flatListToHierarchical(primaryMenuItems.nodes, { idKey: 'id', @@ -86,7 +86,6 @@ export function Layout({ data, children, toc, title }) { parentKey: 'parentId', }) : [] - const footerMenuItems = data?.footerMenuItems ?? [] const footerNavigation = footerMenuItems?.nodes ? flatListToHierarchical(footerMenuItems.nodes, { idKey: 'id', @@ -94,7 +93,6 @@ export function Layout({ data, children, toc, title }) { parentKey: 'parentId', }) : [] - const docsSidebarMenuItems = data?.docsSidebarMenuItems ?? [] const docsSidebarNavigation = docsSidebarMenuItems?.nodes ? flatListToHierarchical(docsSidebarMenuItems.nodes, { idKey: 'id', @@ -105,13 +103,13 @@ export function Layout({ data, children, toc, title }) { let docsSidebarAllLinks = docsSidebarNavigation?.flatMap((section) => section.links) ?? [] let linkIndex = docsSidebarAllLinks.findIndex((link) => { - return link.href === data?.node?.uri + return link.href === node?.uri }) let previousPage = docsSidebarAllLinks[linkIndex - 1] let nextPage = docsSidebarAllLinks[linkIndex + 1] let section = docsSidebarAllLinks.find((section) => - section.links.find((link) => link.href === data?.node?.uri), + section.links.find((link) => link.href === node?.uri), ) let currentSection = useTableOfContents(tableOfContents) @@ -127,8 +125,8 @@ export function Layout({ data, children, toc, title }) { return ( <> - - + +
@@ -138,7 +136,9 @@ export function Layout({ data, children, toc, title }) {
diff --git a/components/LayoutFrontPage.jsx b/components/LayoutFrontPage.jsx index eb0d0c8..4e23011 100644 --- a/components/LayoutFrontPage.jsx +++ b/components/LayoutFrontPage.jsx @@ -1,5 +1,5 @@ import { gql } from '@apollo/client' -import { flatListToHierarchical } from '@faustwp/core' +import { flatListToHierarchical, useFaustQuery } from '@faustwp/core' import { FooterNavigation } from './FooterNavigation' import { SiteFooter } from './SiteFooter' @@ -9,8 +9,8 @@ import { SiteHeader } from '@/components/SiteHeader' import { SitewideNotice } from '@/components/SitewideNotice' -LayoutFrontPage.fragment = gql` - fragment LayoutFrontPageFragment on RootQuery { +export const LAYOUT_FRONT_PAGE_QUERY = gql` + query LayoutFrontPageFragment { ...SitewideNoticeFragment ...PrimaryNavigationFragment ...FooterNavigationFragment @@ -20,8 +20,10 @@ LayoutFrontPage.fragment = gql` ${FooterNavigation.fragment} ` -export function LayoutFrontPage({ data, children }) { - const primaryMenuItems = data?.primaryMenuItems ?? [] +export function LayoutFrontPage({ children }) { + + const { sitewideNotice, primaryMenuItems, footerMenuItems } = useFaustQuery(LAYOUT_FRONT_PAGE_QUERY); + const primaryNavigation = primaryMenuItems?.nodes ? flatListToHierarchical(primaryMenuItems.nodes, { idKey: 'id', @@ -29,7 +31,6 @@ export function LayoutFrontPage({ data, children }) { parentKey: 'parentId', }) : [] - const footerMenuItems = data?.footerMenuItems ?? [] const footerNavigation = footerMenuItems?.nodes ? flatListToHierarchical(footerMenuItems.nodes, { idKey: 'id', @@ -39,8 +40,8 @@ export function LayoutFrontPage({ data, children }) { : [] return ( <> - - + +
{children}
diff --git a/next.config.mjs b/next.config.mjs index bf95845..1527bce 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -2,35 +2,16 @@ import { withFaust, getWpHostname } from '@faustwp/core'; import withMarkdoc from '@markdoc/next.js' import withSearch from './markdoc/search.mjs' -function experimentalConfig() { - - const experimental = { - scrollRestoration: true, - } - - if (process.env.ATLAS_CACHE_HANDLER_ENABLED === undefined) { - const atlasExperimentalOptions = { ...experimental, ...{ - incrementalCacheHandlerPath: require.resolve('./.atlas/atlas-cache-handler.js'), - isrMemoryCacheSize: 0 - }} - console.log( { atlasExperimentalOptions }) - return atlasExperimentalOptions - } - - return experimental -} - const nextConfig = { reactStrictMode: true, pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'], - experimental: experimentalConfig(), + experimental: { + scrollRestoration: true, + }, trailingSlash: true, images: { domains: [getWpHostname()], }, }; - - - -export default withFaust( withSearch( withMarkdoc({ schemaPath: './src/markdoc' })(nextConfig) ) ); +export default withFaust( withSearch( withMarkdoc({ schemaPath: './src/markdoc' })(nextConfig) ) ); \ No newline at end of file diff --git a/wp-blocks/AcfFieldTypeConfigurationBlock.js b/wp-blocks/AcfFieldTypeConfigurationBlock.js index be77ab5..be4b9d2 100644 --- a/wp-blocks/AcfFieldTypeConfigurationBlock.js +++ b/wp-blocks/AcfFieldTypeConfigurationBlock.js @@ -61,6 +61,11 @@ function TabContent({ fieldTypeConfigurationBlockFields, uniqueId, format }) { export function AcfFieldTypeConfigurationBlock({ fieldTypeConfigurationBlockFields }) { const { acfFieldType } = fieldTypeConfigurationBlockFields; + const [uniqueId, setUniqueId] = useState(''); + useEffect(() => { + setUniqueId(stringToHash(acfFieldType)); + }, [acfFieldType]); + if ( ! acfFieldType ) { return ( @@ -70,11 +75,6 @@ export function AcfFieldTypeConfigurationBlock({ fieldTypeConfigurationBlockFiel ); }; - const [uniqueId, setUniqueId] = useState(''); - - useEffect(() => { - setUniqueId(stringToHash(acfFieldType)); - }, [acfFieldType]); const tabData = [ { key: 'php', name: 'PHP' }, diff --git a/wp-blocks/AcfFieldTypeSettingsBlock.js b/wp-blocks/AcfFieldTypeSettingsBlock.js index 6246348..640105c 100644 --- a/wp-blocks/AcfFieldTypeSettingsBlock.js +++ b/wp-blocks/AcfFieldTypeSettingsBlock.js @@ -48,7 +48,7 @@ export function AcfFieldTypeSettingsBlock({ fieldTypeSettingsBlockFields }) { }; - if ( ! fieldTypeSettings?.nodes?.length ) { + if ( fieldTypeSettings?.nodes?.length === 0 ) { return ( @@ -59,7 +59,7 @@ export function AcfFieldTypeSettingsBlock({ fieldTypeSettingsBlockFields }) { } // copy the nodes so we can sort them before returning - const settings = [...fieldTypeSettings?.nodes]; + const settings = [...fieldTypeSettings.nodes]; // sort by name settings.sort((a, b) => { diff --git a/wp-blocks/index.js b/wp-blocks/index.js index 9636478..18dc9c1 100644 --- a/wp-blocks/index.js +++ b/wp-blocks/index.js @@ -1,5 +1,4 @@ import { CoreBlocks } from '@faustwp/blocks' - import { AcfFieldTypeConfigurationBlock } from './AcfFieldTypeConfigurationBlock' import { AcfFieldTypeSettingsBlock } from './AcfFieldTypeSettingsBlock' import { AcfGraphqlQuery } from './AcfGraphqlQuery' diff --git a/wp-templates/IndexTemplate.js b/wp-templates/IndexTemplate.js index 1bd0399..bb9d958 100644 --- a/wp-templates/IndexTemplate.js +++ b/wp-templates/IndexTemplate.js @@ -1,13 +1,62 @@ import { gql } from '@apollo/client' import { WordPressBlocksViewer } from '@faustwp/blocks' -import { flatListToHierarchical } from '@faustwp/core' +import { flatListToHierarchical, useFaustQuery } from '@faustwp/core' import Head from 'next/head' -import { Layout } from '@/components/Layout' +import { LAYOUT_QUERY, Layout } from '@/components/Layout' import blocks from '@/wp-blocks' -export const IndexTemplate = ({ data }) => { - const { node } = data +const INDEX_TEMPLATE_QUERY = gql` +query IndexTemplate($uri: String!) { + node: nodeByUri(uri: $uri) { + __typename + uri + ...on NodeWithTitle { + title + } + ...on NodeWithEditorBlocks { + editorBlocks { + __typename + name + renderedHtml + id: clientId + parentId: parentClientId + ...${blocks.CoreParagraph.fragments.key} + ...${blocks.CoreColumns.fragments.key} + ...${blocks.CoreColumn.fragments.key} + ...${blocks.CoreCode.fragments.key} + ...${blocks.CoreButtons.fragments.key} + ...${blocks.CoreButton.fragments.key} + ...${blocks.CoreQuote.fragments.key} + ...${blocks.CoreImage.fragments.key} + ...${blocks.CoreSeparator.fragments.key} + ...${blocks.CoreList.fragments.key} + ...${blocks.CoreHeading.fragments.key} + } + } + ...on ContentNode { + modified + ...on NodeWithContentEditor { + content + } + } + } +} +${blocks.CoreParagraph.fragments.entry} +${blocks.CoreColumns.fragments.entry} +${blocks.CoreColumn.fragments.entry} +${blocks.CoreCode.fragments.entry} +${blocks.CoreButtons.fragments.entry} +${blocks.CoreButton.fragments.entry} +${blocks.CoreQuote.fragments.entry} +${blocks.CoreImage.fragments.entry} +${blocks.CoreSeparator.fragments.entry} +${blocks.CoreList.fragments.entry} +${blocks.CoreHeading.fragments.entry} +` + +export const IndexTemplate = () => { + const { node } = useFaustQuery(INDEX_TEMPLATE_QUERY) if (!node) { return null @@ -54,9 +103,8 @@ export const IndexTemplate = ({ data }) => { {node?.modified && (
@@ -83,55 +131,12 @@ export const IndexTemplate = ({ data }) => { ) } -IndexTemplate.query = gql` -query IndexTemplate($uri: String!) { - node: nodeByUri(uri: $uri) { - __typename - uri - ...on NodeWithTitle { - title - } - ...on NodeWithEditorBlocks { - editorBlocks { - __typename - name - renderedHtml - id: clientId - parentId: parentClientId - ...${blocks.CoreParagraph.fragments.key} - ...${blocks.CoreColumns.fragments.key} - ...${blocks.CoreColumn.fragments.key} - ...${blocks.CoreCode.fragments.key} - ...${blocks.CoreButtons.fragments.key} - ...${blocks.CoreButton.fragments.key} - ...${blocks.CoreQuote.fragments.key} - ...${blocks.CoreImage.fragments.key} - ...${blocks.CoreSeparator.fragments.key} - ...${blocks.CoreList.fragments.key} - ...${blocks.CoreHeading.fragments.key} - } - } - ...on ContentNode { - modified - ...on NodeWithContentEditor { - content - } - } - } - ...LayoutFragment -} -${blocks.CoreParagraph.fragments.entry} -${blocks.CoreColumns.fragments.entry} -${blocks.CoreColumn.fragments.entry} -${blocks.CoreCode.fragments.entry} -${blocks.CoreButtons.fragments.entry} -${blocks.CoreButton.fragments.entry} -${blocks.CoreQuote.fragments.entry} -${blocks.CoreImage.fragments.entry} -${blocks.CoreSeparator.fragments.entry} -${blocks.CoreList.fragments.entry} -${blocks.CoreHeading.fragments.entry} -${Layout.fragment} -` - -IndexTemplate.variables = ({ uri }) => ({ uri }) +IndexTemplate.queries = [ + { + query: LAYOUT_QUERY, + }, + { + query: INDEX_TEMPLATE_QUERY, + variables: ({ uri }) => ({ uri }), + } +]; \ No newline at end of file diff --git a/wp-templates/archive-field_type.js b/wp-templates/archive-field_type.js index f9e8395..10da1c1 100644 --- a/wp-templates/archive-field_type.js +++ b/wp-templates/archive-field_type.js @@ -1,6 +1,6 @@ import { gql } from '@apollo/client' -import Head from 'next/head' import { useFaustQuery } from "@faustwp/core"; +import Head from 'next/head' import { FieldTypesList } from '@/components/FieldTypesList' import { LayoutArchive, GET_LAYOUT_QUERY } from '@/components/LayoutArchive' @@ -38,7 +38,7 @@ export const GET_POST_QUERY = gql` } `; -export const ArchiveFieldType = (props) => { +export const ArchiveFieldType = () => { const { node } = useFaustQuery(GET_POST_QUERY); const { docsSidebarMenuItems, @@ -47,8 +47,6 @@ export const ArchiveFieldType = (props) => { sitewideNotice } = useFaustQuery(GET_LAYOUT_QUERY); - // console.log({ node, docsSidebarMenuItems, footerMenuItems, primaryMenuItems, sitewideNotice }); - if (!node) { return null } diff --git a/wp-templates/archive.js b/wp-templates/archive.js index c32e874..bccb6dc 100644 --- a/wp-templates/archive.js +++ b/wp-templates/archive.js @@ -1,27 +1,9 @@ import { gql } from '@apollo/client' +import { useFaustQuery } from "@faustwp/core"; import Head from 'next/head' import { LayoutArchive, GET_LAYOUT_QUERY } from '@/components/LayoutArchive' -export const Archive = (props) => { - const { data } = props - - return ( - <> - - {`${data?.node?.name} - WPGraphQL for ACF`} - - - {/*
{JSON.stringify(props, null, 2)}
*/} -
- - ) -} - const GET_ARCHIVE_QUERY = gql` query GetArchive($uri: String!) { node: nodeByUri(uri: $uri) { @@ -44,9 +26,47 @@ const GET_ARCHIVE_QUERY = gql` } ` -Archive.variables = (seedNode) => { - console.log({seedNode}); - return { - uri: seedNode.uri - }; +export const Archive = () => { + const { node } = useFaustQuery(GET_ARCHIVE_QUERY); + const { + docsSidebarMenuItems, + footerMenuItems, + primaryMenuItems, + sitewideNotice + } = useFaustQuery(GET_LAYOUT_QUERY); + + return ( + <> + + {`${node?.name} - WPGraphQL for ACF`} + + + {/*
{JSON.stringify(props, null, 2)}
*/} +
+ + ) } + + +Archive.queries = [ + { + query: GET_LAYOUT_QUERY, + }, + { + query: GET_ARCHIVE_QUERY, + variables: (seedNode) => { + return { + uri: seedNode.uri + } + } + } +]; diff --git a/wp-templates/front-page.js b/wp-templates/front-page.js index 2aadb83..fd2c3c4 100644 --- a/wp-templates/front-page.js +++ b/wp-templates/front-page.js @@ -4,32 +4,10 @@ import HomepageLayoutsLayoutsFaqsLayout from '@/components/HomepageLayoutsLayout import HomepageLayoutsLayoutsFeaturesLayout from '@/components/HomepageLayoutsLayoutsFeaturesLayout' import HomepageLayoutsLayoutsHeroLayout from '@/components/HomepageLayoutsLayoutsHeroLayout' import HomepageLayoutsLayoutsSupportedFieldTypesLayout from '@/components/HomepageLayoutsLayoutsSupportedFieldTypesLayout' -import { LayoutFrontPage } from '@/components/LayoutFrontPage' +import { LayoutFrontPage, LAYOUT_FRONT_PAGE_QUERY } from '@/components/LayoutFrontPage' +import { useFaustQuery } from '@faustwp/core' -export const FrontPage = ({ data }) => { - return ( - - {data?.frontPage?.homepageLayouts?.layouts?.map((layout, i) => { - switch (layout.__typename) { - case 'HomepageLayoutsLayoutsHeroLayout': - return - case 'HomepageLayoutsLayoutsFeaturesLayout': - return - case 'HomepageLayoutsLayoutsSupportedFieldTypesLayout': - return ( - - ) - case 'HomepageLayoutsLayoutsFaqsLayout': - return - default: - return
{JSON.stringify(layout, null, 2)}
- } - })} -
- ) -} - -FrontPage.query = gql` +const FRONT_PAGE_QUERY = gql` query GetFrontPage($uri: String!) { frontPage: nodeByUri(uri: $uri) { __typename @@ -53,13 +31,47 @@ FrontPage.query = gql` } } } - ...LayoutFrontPageFragment } ${HomepageLayoutsLayoutsHeroLayout.fragment} ${HomepageLayoutsLayoutsFeaturesLayout.fragment} ${HomepageLayoutsLayoutsSupportedFieldTypesLayout.fragment} ${HomepageLayoutsLayoutsFaqsLayout.fragment} - ${LayoutFrontPage.fragment} -` +`; + +export const FrontPage = () => { + + const { frontPage } = useFaustQuery(FRONT_PAGE_QUERY); + + return ( + + {frontPage?.homepageLayouts?.layouts?.map((layout, i) => { + switch (layout.__typename) { + case 'HomepageLayoutsLayoutsHeroLayout': + return + case 'HomepageLayoutsLayoutsFeaturesLayout': + return + case 'HomepageLayoutsLayoutsSupportedFieldTypesLayout': + return ( + + ) + case 'HomepageLayoutsLayoutsFaqsLayout': + return + default: + return
{JSON.stringify(layout, null, 2)}
+ } + })} +
+ ) +} + + +FrontPage.queries = [ + { + query: LAYOUT_FRONT_PAGE_QUERY, + }, + { + query: FRONT_PAGE_QUERY, + variables: ({ uri }) => ({ uri }), + }, +] -FrontPage.variables = ({ uri }) => ({ uri }) diff --git a/wp-templates/single-field_type.js b/wp-templates/single-field_type.js index 55ba9c8..ed867ae 100644 --- a/wp-templates/single-field_type.js +++ b/wp-templates/single-field_type.js @@ -1,18 +1,81 @@ import { gql } from '@apollo/client' import { WordPressBlocksViewer } from '@faustwp/blocks' -import { flatListToHierarchical } from '@faustwp/core' +import { flatListToHierarchical, useFaustQuery } from '@faustwp/core' import { Separator } from '@radix-ui/react-separator' import Head from 'next/head' -import { Layout } from '@/components/Layout' +import { Layout, LAYOUT_QUERY } from '@/components/Layout' import { Badge } from '@/components/ui/badge' import blocks from '@/wp-blocks' import { AcfFieldTypeConfigurationBlock } from '@/wp-blocks/AcfFieldTypeConfigurationBlock' import { AcfFieldTypeSettingsBlock } from '@/wp-blocks/AcfFieldTypeSettingsBlock' import { AcfGraphqlQuery } from '@/wp-blocks/AcfGraphqlQuery' -export const SingleFieldType = ({ data }) => { - const { node } = data +const aCFFieldTypeCategoriesFragment = gql` + fragment aCFFieldTypeCategoriesFragment on FieldType { + aCFFieldTypeCategories { + nodes { + id + name + } + } + } +` + +const SINGLE_ACF_FIELD_TYPE_QUERY = gql` +query SingleAcfFieldType($uri: String!) { + node: nodeByUri(uri: $uri) { + __typename + uri + ...on FieldType { + title + # content + modified + editorBlocks { + __typename + name + renderedHtml + id: clientId + parentId: parentClientId + ...${blocks.CoreParagraph.fragments.key} + ...${blocks.CoreColumns.fragments.key} + ...${blocks.CoreColumn.fragments.key} + ...${blocks.CoreCode.fragments.key} + ...${blocks.CoreButtons.fragments.key} + ...${blocks.CoreButton.fragments.key} + ...${blocks.CoreQuote.fragments.key} + ...${blocks.CoreImage.fragments.key} + ...${blocks.CoreSeparator.fragments.key} + ...${blocks.CoreList.fragments.key} + ...${blocks.CoreHeading.fragments.key} + ...${AcfFieldTypeSettingsBlock.fragments.key} + ...${AcfFieldTypeConfigurationBlock.fragments.key} + ...${AcfGraphqlQuery.fragments.key} + } + } + ...aCFFieldTypeCategoriesFragment + } +} +${aCFFieldTypeCategoriesFragment} +${AcfFieldTypeSettingsBlock.fragments.entry} +${AcfFieldTypeConfigurationBlock.fragments.entry} +${AcfGraphqlQuery.fragments.entry} + +${blocks.CoreParagraph.fragments.entry} +${blocks.CoreColumns.fragments.entry} +${blocks.CoreColumn.fragments.entry} +${blocks.CoreCode.fragments.entry} +${blocks.CoreButtons.fragments.entry} +${blocks.CoreButton.fragments.entry} +${blocks.CoreQuote.fragments.entry} +${blocks.CoreImage.fragments.entry} +${blocks.CoreSeparator.fragments.entry} +${blocks.CoreList.fragments.entry} +${blocks.CoreHeading.fragments.entry} +` + +export const SingleFieldType = () => { + const { node } = useFaustQuery(SINGLE_ACF_FIELD_TYPE_QUERY) if (!node) { return null @@ -50,7 +113,7 @@ export const SingleFieldType = ({ data }) => { {`${title} - WPGraphQL for ACF`} - +

{title}

{node?.aCFFieldTypeCategories && node?.aCFFieldTypeCategories?.nodes && (
@@ -79,69 +142,12 @@ export const SingleFieldType = ({ data }) => { ) } -const aCFFieldTypeCategoriesFragment = gql` - fragment aCFFieldTypeCategoriesFragment on FieldType { - aCFFieldTypeCategories { - nodes { - id - name - } - } - } -` - -SingleFieldType.query = gql` -query SingleAcfFieldType($uri: String!) { - ...LayoutFragment - node: nodeByUri(uri: $uri) { - __typename - uri - ...on FieldType { - title - # content - modified - editorBlocks { - __typename - name - renderedHtml - id: clientId - parentId: parentClientId - ...${blocks.CoreParagraph.fragments.key} - ...${blocks.CoreColumns.fragments.key} - ...${blocks.CoreColumn.fragments.key} - ...${blocks.CoreCode.fragments.key} - ...${blocks.CoreButtons.fragments.key} - ...${blocks.CoreButton.fragments.key} - ...${blocks.CoreQuote.fragments.key} - ...${blocks.CoreImage.fragments.key} - ...${blocks.CoreSeparator.fragments.key} - ...${blocks.CoreList.fragments.key} - ...${blocks.CoreHeading.fragments.key} - ...${AcfFieldTypeSettingsBlock.fragments.key} - ...${AcfFieldTypeConfigurationBlock.fragments.key} - ...${AcfGraphqlQuery.fragments.key} - } - } - ...aCFFieldTypeCategoriesFragment - } -} -${Layout.fragment} -${aCFFieldTypeCategoriesFragment} -${AcfFieldTypeSettingsBlock.fragments.entry} -${AcfFieldTypeConfigurationBlock.fragments.entry} -${AcfGraphqlQuery.fragments.entry} - -${blocks.CoreParagraph.fragments.entry} -${blocks.CoreColumns.fragments.entry} -${blocks.CoreColumn.fragments.entry} -${blocks.CoreCode.fragments.entry} -${blocks.CoreButtons.fragments.entry} -${blocks.CoreButton.fragments.entry} -${blocks.CoreQuote.fragments.entry} -${blocks.CoreImage.fragments.entry} -${blocks.CoreSeparator.fragments.entry} -${blocks.CoreList.fragments.entry} -${blocks.CoreHeading.fragments.entry} -` - -SingleFieldType.variables = ({ uri }) => ({ uri }) +SingleFieldType.queries = [ + { + query: LAYOUT_QUERY, + }, + { + query: SINGLE_ACF_FIELD_TYPE_QUERY, + variables: ({ uri }) => ({ uri }), + }, +]; \ No newline at end of file