Markdown widget's value under list widget is interpreted as string rather than HTML in GraphlQL query

Hey I have this list in my config.yaml

- label: "Itinerary"
        name: "itinerary"
        widget: "list"
        summary: '{{fields.title}}'
        fields:
          - { label: "Title", name: "title", widget: "string" }
          - { label: "Description", name: "description", widget: "markdown" }
          - { label: "Image", name: "image", widget: image }

And my query:

query FixedDepartureByID($id: String!) {
    markdownRemark(id: { eq: $id }) {
      id
      frontmatter {
        title
        description
        is_visible
        group_size
        remaining_seats
        price
        duration
        difficulty
        brochure
        image {
          childImageSharp {
            gatsbyImageData(formats: [WEBP])
          }
        }
        itinerary {
          title
          description //here this description is coming as string but not HTML
          image {
            childImageSharp {
              gatsbyImageData(formats: [WEBP])
            }
          }
        }
      }
    }
  }

I want the description that’s a markdown as HTML only but when I’m querying this, I’m getting it as string…
Is there anything I’m doing wrong? or is it something else. I’m really new to this so forgive me if this’s a dumb question…

Hi, I’d reach out to decap CMS as they are managing this as of now.

Hey, thanks for your reply I went through Dcap CMS’ website and I saw this note there…

Please note: The markdown widget outputs a raw markdown string. Your static site generator may or may not render the markdown to HTML automatically. Consult with your static site generator’s documentation for more information about rendering markdown.

Hey I think I got it’s solution… the Markdown widgets will always give you a string in GraphQL query you just need to convert the markdown string to actual HTML and to do so you might need an NPM package called “react-markdown
After implementing this, the markdown string was rendered as HTML out of the box…

Silly me I should’ve researched more on this before opening a forum…

No worries! Glad you found a solution!