Skip to content

Commit

Permalink
feat: rich text graphql support
Browse files Browse the repository at this point in the history
  • Loading branch information
YvesRijckaert committed Mar 22, 2023
1 parent 9ece2bf commit 55c2855
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/graphql/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ export function updateEntry(
// FIXME: handle locale fallbacks
modified[name] = update.fields?.[name]?.[locale] ?? null;
}

if (field.type === 'RichText') {
// Falling back to 'null' as it's what GraphQL users would expect
// FIXME: handle locale fallbacks
modified[name].json = update?.fields?.[name]?.[locale] ?? null;
}
}

return modified;
Expand Down

0 comments on commit 55c2855

Please sign in to comment.