Skip to content

Parsing rich text from Contentful is a poorly-documented nightmare #13109

@YCMitch

Description

@YCMitch

So, there's not really any meaningful documentation on how to do this, and as of yet I've spent pretty much all day chasing my own tail, writing the longest, ugliest GraphQL queries I've ever seen.

Is this actually a thing that works? So far I can render one (1) paragraph tag with this humungous query:

export const pageQuery = graphql query contentPageQuery($id: String!) { contentfulContentPage(id: { eq: $id }) { title introduction { title contentBlocks { title content { nodeType content { nodeType content { nodeType value marks { type } content { nodeType content { nodeType content { nodeType } } } } } } } } } }

... but a simple unordered list causes everything to come crashing down.

I guess what I'm asking is if there's actually any documentation out there, or if any real human beings have been able to use this?

I've never missed <?php the_content(); ?> so much in my life.

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