pageUpdate mutation defaults body field to empty string when not explicitly set

Topic summary

A critical bug in Shopify’s pageUpdate GraphQL mutation causes the body field to be overwritten with an empty string when not explicitly included in the mutation input.

This behavior contradicts GraphQL best practices, where omitting optional fields should preserve existing values rather than clearing them. The issue persists across multiple API versions, including the latest 2025-07.

Key concerns:

  • Sparse updates (updating only specific fields) are not working as documented
  • The bug has existed for months without resolution
  • Potential for severe SEO damage if page content is accidentally cleared

Current status: Multiple developers have confirmed experiencing this issue. No official fix timeline has been provided by Shopify, despite the severity and duration of the problem.

Summarized with AI on October 26. AI used: claude-sonnet-4-5-20250929.

Graphql

mutation UpdateMetafieldsForPage ($id: ID!,$page: PageUpdateInput!) {
	pageUpdate(id: $id, page: $page) {
		page {
			id
      title
      body
      handle
			metafields(first: 250) {
				edges {
					node {
						... MetafieldFields
					}
				}
			}
		}
		userErrors {
			field
			message
		}
	}
}
fragment MetafieldFields on Metafield {
	id
	key
	value
	legacyResourceId
	namespace
	type
	description
	createdAt
	updatedAt
}

Bug Description:
When using the pageUpdate mutation to update page attributes without specifying the body field, the body field is unexpectedly set to an empty string, even though the original page body (e.g., for the page gid://shopify/Page/111432794252) is not empty.

Observed Behavior:

  • If the body field is omitted in the PageUpdateInput, the API overwrites it with an empty string instead of leaving it unchanged.
  • This occurs regardless of the Shopify Admin API version used

Expected Behavior:
According to GraphQL best practices, omitting a non-required field in an update input should not alter its existing value. The body should retain its original content unless explicitly modified in the mutation.

1 Like

Seeing this as well

Hey Shopify, this is a pretty big issue to tell us sparse updates are possible but when we do one you’re clearing other fields unexpectedly.

I’m still seeing this in V 2025-07.

It’s been months now, when can we expect this to be resolved?

This is an absolutely brutal bug and could be potentially devastating for SEO.