rich-text icon indicating copy to clipboard operation
rich-text copied to clipboard

BUG: RichText api code block field mismatch with Typescript Types

Open Gregorein opened this issue 9 months ago • 0 comments

Hi, as in issue title -

on version @graphcms/[email protected], type NodeRendererType expects incorrect key for Code Block:code_block?: DefaultNodeRenderer; line 60

However this can be tested with current hygraph studio that the returned type is code-block which results in data not being rendered: query fragment:

      ... on FieldRichText {
        content {
          json
        }
      }

returns:

{
  "content": {
    "json": {
      "children": [
        {
          "type": "code-block",
          "children": [
            {
              "text": ...

Gregorein avatar Mar 07 '25 13:03 Gregorein