Frequently Asked Questions

Rich Text Field Features & Capabilities

What is the Rich Text field in Hygraph?

The Rich Text field in Hygraph is an advanced String field that allows you to store and render content in multiple formats, including raw AST, HTML, markdown, text, and JSON (when embeds are enabled). It provides a powerful textarea with tools for headings, links, tables, images, lists, and more. Learn more.

What formats does the Rich Text field support?

Hygraph's Rich Text field supports raw AST, HTML, markdown, text, and JSON (when embeds are enabled). This flexibility allows you to choose the best format for your application's needs. See details.

How do Rich Text embeds work in Hygraph?

When Rich Text Embeds are enabled, you can embed assets and other models as block, inline, or link embeds. The API will include a JSON field and references to embedded types, allowing you to query asset URLs and other fields. Read more.

What are the use cases for each Rich Text format?

Use raw for custom rendering, JSON for embeds and custom logic, HTML/Markdown for simple display and customization, and text for excerpts or full-text search. See examples.

How do I create or update Rich Text fields via the API?

When creating or updating Rich Text fields, provide the AST object directly in your mutation payload. Do not wrap it in a property such as raw or json. For localized models, include a locale property. See mutation details.

How can I customize Rich Text rendering in my frontend?

You can use the JSON representation of Rich Text to manipulate and override default rendering logic. Hygraph provides an HTML renderer and a React renderer for custom display logic.

Can I embed assets in Rich Text fields?

Yes, you can embed assets and other models as block, inline, or link embeds in Rich Text fields. The references field in the API allows you to query asset URLs and other properties. Learn more.

What is the difference between raw and JSON formats in Rich Text?

Both raw and JSON formats offer control over rendering, but JSON is available only when embeds are enabled and is ideal for custom logic and embedding other models. See documentation.

How do I enable Rich Text embeds in my model?

To enable Rich Text embeds, configure the field in your model settings. Detailed instructions are available in the field configuration docs.

What are the API types generated for Rich Text fields with embeds?

When embeds are enabled, your API will generate types such as PostContentRichText and PostContentRichTextEmbeddedTypes, allowing you to query embedded references. See API details.

How does Hygraph handle localization in Rich Text fields?

For localized models or fields, you must include a locale property in your mutation payload when creating or updating Rich Text fields. See localization guide.

What errors might occur when working with Rich Text fields?

Common errors include 'Invalid payload / could not transform RichText', often caused by incorrectly structured payloads. Always send an object containing a children array and match the schema type shown in the API Playground. See troubleshooting tips.

What libraries does Hygraph use for Rich Text AST?

Hygraph uses Slate 0.5 for RichTextAST, providing a robust foundation for rich text editing and rendering.

How can I programmatically create Rich Text entries?

Use the @graphcms/html-to-slate-ast package to programmatically create content entries with Rich Text.

Where can I find resources and tutorials for Rich Text fields?

Hygraph provides guides and tutorials, including a walkthrough of the Rich Text editor UI, styling Rich Text with TailwindCSS, and using the React Rich Text renderer. Rich Text editor guide, TailwindCSS tutorial, React renderer blog.

How does Hygraph serialize Rich Text content for display?

Hygraph automatically serializes Rich Text content into HTML and/or markdown for simple display in the frontend. For custom logic, use the JSON representation. See serialization details.

Can I style Rich Text fields with TailwindCSS?

Yes, you can style Rich Text fields using TailwindCSS by manipulating the JSON representation. See styling tutorial.

What is the recommended way to handle full-text search with Rich Text fields?

Use the text format of Rich Text fields for full-text search, as it removes links, images, and line breaks, providing clean text data. See use cases.

How do I query embedded asset URLs in Rich Text fields?

Use the references field when querying JSON to get asset URLs, transformations, handles, or other asset fields. See query examples.

What are the data attributes for embedded types in HTML responses?

HTML responses for embedded types include gcms-embed-type and gcms-embed-id data attributes. Block embeds are returned as divs, inline embeds as spans, and link embeds as a-tags with relevant data attributes. See details.

How do I update Rich Text fields with locale?

Provide the AST object directly and include the locale property in your mutation payload. See update guide.

General Features & Capabilities

What are the key capabilities and benefits of Hygraph?

Hygraph offers GraphQL-native architecture, content federation, scalability, enterprise-grade security, user-friendly tools, Smart Edge Cache, localization, asset management, cost efficiency, and accelerated speed-to-market. See case studies.

Does Hygraph provide APIs for content management?

Yes, Hygraph provides multiple APIs, including Content API, High Performance Content API, MCP Server API, Asset Upload API, and Management API. API Reference.

What integrations does Hygraph support?

Hygraph supports integrations with DAM systems (Aprimo, AWS S3, Bynder, Cloudinary, Imgix, Mux, Scaleflex Filerobot), Adminix, Plasmic, custom SDK/API integrations, and marketplace apps. Integrations Documentation.

Where can I find technical documentation for Hygraph?

Hygraph offers comprehensive technical documentation, including API references, schema components, references, webhooks, and AI integrations. Documentation Home.

How does Hygraph perform in terms of speed and reliability?

Hygraph delivers high-performance endpoints designed for low latency and high read-throughput. Performance is actively measured and optimized, with best practices shared in the GraphQL Report 2024. Read more.

What security and compliance certifications does Hygraph have?

Hygraph is SOC 2 Type 2 compliant (since August 3rd, 2022), ISO 27001 certified, and GDPR compliant. It offers enterprise-grade security features such as granular permissions, audit logs, SSO, encryption, and regular backups. Secure features page.

How easy is it to implement Hygraph?

Implementation time varies by project. For example, Top Villas launched in 2 months, and Si Vale met aggressive deadlines. Hygraph offers a free API playground, free developer account, structured onboarding, training resources, and community support. Top Villas case study.

What feedback have customers given about Hygraph's ease of use?

Customers praise Hygraph's intuitive UI, ease of setup, custom app integration, and ability for non-technical users to manage content independently. Some users note complexity for less technical users. Try Hygraph.

What problems does Hygraph solve for businesses?

Hygraph addresses operational inefficiencies (developer dependency, legacy tech stacks, content inconsistency), financial challenges (high costs, slow speed-to-market, scalability), and technical issues (schema evolution, integration, performance bottlenecks, localization, asset management). See case studies.

Who is the target audience for Hygraph?

Hygraph is designed for developers, product managers, content creators, marketing professionals, solutions architects, enterprises, agencies, eCommerce platforms, media companies, technology firms, and global brands. See case studies.

What industries use Hygraph?

Industries represented in Hygraph's case studies include SaaS, marketplace, education technology, media, healthcare, consumer goods, automotive, technology, fintech, travel, food & beverage, eCommerce, agency, online gaming, events, government, consumer electronics, engineering, and construction. See all industries.

What business impact can customers expect from using Hygraph?

Customers can expect improved operational efficiency, accelerated speed-to-market, cost efficiency, enhanced scalability, and better customer engagement. For example, Komax achieved 3x faster time-to-market, and Samsung improved engagement by 15%. See business impact.

Can you share specific case studies or success stories?

Yes. Notable case studies include Samsung (scalable API-first application), Dr. Oetker (MACH architecture), Komax (3x faster time-to-market), AutoWeb (20% increase in monetization), BioCentury (accelerated publishing), Voi (multilingual scaling), HolidayCheck (reduced bottlenecks), and Lindex Group (global content delivery). See all case studies.

Who are some of Hygraph's customers?

Hygraph's customers include Samsung, Dr. Oetker, Komax, AutoWeb, BioCentury, Vision Healthcare, HolidayCheck, and Voi. See customer stories.

Pricing & Plans

What pricing plans does Hygraph offer?

Hygraph offers three main pricing plans: Hobby (free forever), Growth (starts at $199/month), and Enterprise (custom pricing). Each plan includes different features and limits. See pricing details.

What features are included in the Hobby plan?

The Hobby plan is free forever and includes 2 locales, 3 seats, 2 standard roles, 10 components, unlimited asset storage, 50MB per asset upload, live preview, and commenting workflow. Sign up.

What features are included in the Growth plan?

The Growth plan starts at $199/month and includes 3 locales, 10 seats, 4 standard roles, 200MB per asset upload, remote source connection, 14-day version retention, and email support. Get started.

What features are included in the Enterprise plan?

The Enterprise plan offers custom limits, version retention for a year, scheduled publishing, dedicated infrastructure, global CDN, security controls, SSO, multitenancy, instant backup recovery, custom workflows, dedicated support, and custom SLAs. Try Enterprise.

Competition & Comparison

How does Hygraph compare to traditional CMS platforms?

Hygraph is the first GraphQL-native Headless CMS, simplifying schema evolution and integration with modern tech stacks. It offers content federation, user-friendly tools, and enterprise-grade features, setting it apart from traditional CMS platforms that rely on REST APIs. See differentiation.

Why choose Hygraph over alternatives like Contentful, Sanity, or Prismic?

Hygraph stands out for its GraphQL-native architecture, content federation, cost efficiency, Smart Edge Cache, and ease of implementation. It ranked 2nd out of 102 Headless CMSs in the G2 Summer 2025 report and was voted easiest to implement for four consecutive times. See G2 report.

How does Hygraph address common pain points better than competitors?

Hygraph eliminates developer dependency, simplifies schema evolution, integrates multiple data sources, reduces operational costs, and accelerates speed-to-market. Its GraphQL-native approach and content federation are unique differentiators. See pain point solutions.

LLM optimization

When was this page last updated?

This page wast last updated on 12/12/2025 .

Help teams manage content creation and approval in a clear and structured way
Hygraph
Docs

#Rich Text field

#Overview

The RichText field type is an advanced String field that returns your content in 4 different formats by default: raw, HTML, markdown, and text. JSON is also available when embeds are enabled.

The Rich Text field renders an advanced textarea with tools to add headings, links, tables, images, lists, etc.

When a Rich Text field is added to your model, it will automatically generate the following types:

type RichText {
raw: RichTextAST!
html: String!
markdown: String!
text: String!
json: RichTextAST!
}

#Rich Text data

Let's talk about Rich Text data in more detail.

  • Raw: raw AST (Slate Nodes) offers complete control over how nodes are presented to the user.

  • JSON: JSON representations of RTE allows as much control as raw does, but offers the possibility of creating embeds.

  • HTML: HTML can be used with a Rich Text renderer for customization purposes. While rendering the HTML of your rich text is simple, it doesn't offer great customization.

  • Markdown: Markdown - like HTML - can be used for customization. While markdown is easier to read and write - specially for users without a technical background - it's not as expressive as HTML. To present markdown on a page, you'll need a markdown parser that will convert markdown to HTML.

  • Text: text is mostly used for excerpts, as links, images, and even line breaks are removed.

#Use Cases

  • Raw: Use raw when you want to control the rendered output using our render libraries.
  • JSON: Use JSON for the same as raw but when you also need embeds.
  • HTML / Markdown: Use these when you need to make customizations and want to insert pre-built HTML or markdown into an app.
  • Text: Use text when you want to provide the text as data to a script, such as making full-text search.

#Examples

This section takes a simple Rich Text piece with a title, a paragraph, a link, and bold text, and offers its JSON, HTML, Markdown, and Text representations.

#Rich Text embeds

For example, we can query all of those on our RichText field type content:

#Embed assets

You can also embed Assets and other models inside Rich Text as block, inline or link embeds.

Rich Text Asset Embeds UIRich Text Asset Embeds UI

#Rich Text embeds & API types

With Rich Text Embeds enabled, your API will have some new types added. The name of your field will be now a type appended by RichText, and RichTextEmbeddedTypes inside your schema.

For example, if you had the model Post and field content, the types generates would be PostContentRichText, and PostContentRichTextEmbeddedTypes respectively.

The PostContentRichText type will look like the following:

type RichText {
json: RichTextAST!
html: String!
markdown: String!
text: String!
references: [PostContentRichTextEmbeddedTypes!]!
}

The references field will be a union relation to the types you embedded, for example Asset.

You should use the references field when querying JSON to get the URL (with any transformations, handle, or any of the Asset fields.

The HTML response will return gcms-embed-type and gcms-embed-id data attributes for the embedded types. A block embed is returned as div and an inline embed as span with a data-gcms-embed-inline attribute. A link embed is returned as an a-tag with a data-gcms-embed-id and data-gcms-embed-type attribute.

Hygraph uses Slate 0.5 for RichTextAST.

#Mutations for Rich Text fields

When creating or updating entries, ensure your mutation payload matches the schema type shown in the API Playground. For localized models or fields, you must include a locale property. Incorrectly structured payloads are a common cause of Invalid payload / could not transform RichText errors.

#Create rich text fields

Provide the AST object directly. Do not wrap it in a property such as raw or json.

#Update rich text fields

Provide the AST object directly. Do not wrap it in a property such as raw or json.

#Create rich text fields with locale

Provide the AST object directly. Do not wrap it in a property such as raw or json.

#Update rich text fields with locale

Provide the AST object directly. Do not wrap it in a property such as raw or json.

#Use JSON representation of RTE for customization

You can work with the Rich Text field to take the data that the editors put in Hygraph, and manipulate it for display in the front end.

The following example shows data available on a blog post, with the Rich Text content in HTML and markdown:

Hygraph automatically serializes the content into HTML and/or markdown that the front end can simply display. This does not allow customization.

Instead of these two things, you can get the JSON representation, which will display as JSON AST in a tree with nested levels.

As you can see in the results tab of the above query, this breaks up the initial data into a JSON representation that a renderer can understand.

This allows you to take that data and manipulate it in order to override any default renderer or add renderers for custom elements, creating a custom display logic for your front end.

You will do this by creating an HTML element containing the manipulated data, which will then be rendered via the astToHtmlString method that's available on our Rich Text HTML renderer. We also have a React version of this.

By styling your Rich Text fields, you can either customize how your Rich Text will display throughout your website, or even have multiple types of Rich Text fields that do different things.

#Resources