Skip to content

Unknown fragment linkPropertyData #93

@ethan-schofer

Description

@ethan-schofer

Hi

Trying to use the Optimizely SaaS starter site. In the CMS, I have page type with a property that is a LinkItem. When I generate code, it generates a graphql query for this:

fragment linkPropertyData on linkProperty {
url { ...LinkData }
title
text
target
}

Here is the page that references this fragment:

fragment BasicPageData on BasicPage {
PageBanner { ...BlockData }
PageTitle
BodyText { json, html }
BodyTextCta { ...linkPropertyData }
BodyTextCtaAccessibilityText
MainContent { ...BlockData }
}

But when run 'yarn compile' I get an error that it can't find this fragment:

[FAILED] GraphQL Document Validation failed with 1 errors;
[FAILED] Error 0: Unknown fragment "linkPropertyData".
[FAILED] at C:/Projects/opti-saas-starter/src/components/cms/page/BasicPage/BasicPage.page.graphql:5:20

Does this have to do with the LinkItem itself? Do I need to explicitly import that fragment? Would that get lost the next time I compiled?

Thanks

Ethan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions