Skip to content

docs: fix Post_body example variable#4767

Merged
yaacovCR merged 1 commit into
graphql:16.x.xfrom
fallintoplace:fix/post-body-source
May 25, 2026
Merged

docs: fix Post_body example variable#4767
yaacovCR merged 1 commit into
graphql:16.x.xfrom
fallintoplace:fix/post-body-source

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Summary

  • replace the undefined obj variable with source in the Post_body resolver example
  • keep the change scoped to the production guide docs example only

Why

The current snippet defines function Post_body(source, args, context, info) but passes post: obj, which is undefined and causes the copied example to fail immediately.

Closes #4765.

Validation

  • npx --yes prettier@2.6.2 --check website/pages/docs/going-to-production.mdx
  • git diff --check

@vercel

vercel Bot commented May 23, 2026

Copy link
Copy Markdown

@fallintoplace is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@linux-foundation-easycla

linux-foundation-easycla Bot commented May 23, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: fallintoplace / name: Minh Vu (b81b78a)

@fallintoplace fallintoplace marked this pull request as ready for review May 23, 2026 22:10
@yaacovCR

Copy link
Copy Markdown
Contributor

Thanks for this fix!

@yaacovCR yaacovCR merged commit 80c6508 into graphql:16.x.x May 25, 2026
20 of 21 checks passed
yaacovCR added a commit to yaacovCR/graphql-js that referenced this pull request Jun 1, 2026
## v16.14.1 (2026-06-02)

#### Docs 📝
<details>
<summary> 9 PRs were merged </summary>

* [graphql#4737](graphql#4737) docs: refresh upgrade guide and v17 topics ([@yaacovCR](https://github.com/yaacovCR))
* [graphql#4741](graphql#4741) docs: add v16 API docs lint coverage ([@yaacovCR](https://github.com/yaacovCR))
* [graphql#4748](graphql#4748) docs: update banner ([@yaacovCR](https://github.com/yaacovCR))
* [graphql#4750](graphql#4750) docs: use api docs generated from inline jsdoc comments ([@yaacovCR](https://github.com/yaacovCR))
* [graphql#4754](graphql#4754) docs: update website caniuse-lite data ([@yaacovCR](https://github.com/yaacovCR))
* [graphql#4755](graphql#4755) docs: hide internal type member __validationErrors ([@yaacovCR](https://github.com/yaacovCR))
* [graphql#4757](graphql#4757) docs: fix inline examples, deprecation descriptions, type category ([@yaacovCR](https://github.com/yaacovCR))
* [graphql#4759](graphql#4759) docs: fix static export redirect config ([@yaacovCR](https://github.com/yaacovCR))
* [graphql#4767](graphql#4767) docs: fix Post_body example variable ([@fallintoplace](https://github.com/fallintoplace))
</details>

#### Polish 💅
* [graphql#4738](graphql#4738) chore(tests): add test for directive extensions without flag enabled ([@yaacovCR](https://github.com/yaacovCR))

#### Internal 🏠
* [graphql#4778](graphql#4778) fix: generated version documentation ([@yaacovCR](https://github.com/yaacovCR))

#### Committers: 2
* Minh Vu([@fallintoplace](https://github.com/fallintoplace))
* Yaacov Rydzinski ([@yaacovCR](https://github.com/yaacovCR))
yaacovCR added a commit that referenced this pull request Jun 1, 2026
## v16.14.1 (2026-06-02)

#### Docs 📝
<details>
<summary> 9 PRs were merged </summary>

* [#4737](#4737) docs: refresh upgrade guide and v17 topics ([@yaacovCR](https://github.com/yaacovCR))
* [#4741](#4741) docs: add v16 API docs lint coverage ([@yaacovCR](https://github.com/yaacovCR))
* [#4748](#4748) docs: update banner ([@yaacovCR](https://github.com/yaacovCR))
* [#4750](#4750) docs: use api docs generated from inline jsdoc comments ([@yaacovCR](https://github.com/yaacovCR))
* [#4754](#4754) docs: update website caniuse-lite data ([@yaacovCR](https://github.com/yaacovCR))
* [#4755](#4755) docs: hide internal type member __validationErrors ([@yaacovCR](https://github.com/yaacovCR))
* [#4757](#4757) docs: fix inline examples, deprecation descriptions, type category ([@yaacovCR](https://github.com/yaacovCR))
* [#4759](#4759) docs: fix static export redirect config ([@yaacovCR](https://github.com/yaacovCR))
* [#4767](#4767) docs: fix Post_body example variable ([@fallintoplace](https://github.com/fallintoplace))
</details>

#### Polish 💅
* [#4738](#4738) chore(tests): add test for directive extensions without flag enabled ([@yaacovCR](https://github.com/yaacovCR))

#### Internal 🏠
* [#4778](#4778) fix: generated version documentation ([@yaacovCR](https://github.com/yaacovCR))

#### Committers: 2
* Minh Vu([@fallintoplace](https://github.com/fallintoplace))
* Yaacov Rydzinski ([@yaacovCR](https://github.com/yaacovCR))
yaacovCR pushed a commit to yaacovCR/graphql-js that referenced this pull request Jun 3, 2026
## Summary

- replace the undefined `obj` variable with `source` in the `Post_body`
resolver example
- keep the change scoped to the production guide docs example only

## Why

The current snippet defines `function Post_body(source, args, context,
info)` but passes `post: obj`, which is undefined and causes the copied
example to fail immediately.

Closes graphql#4765.

## Validation

- `npx --yes prettier@2.6.2 --check
website/pages/docs/going-to-production.mdx`
- `git diff --check`
yaacovCR pushed a commit that referenced this pull request Jun 3, 2026
## Summary

- replace the undefined `obj` variable with `source` in the `Post_body`
resolver example
- keep the change scoped to the production guide docs example only

## Why

The current snippet defines `function Post_body(source, args, context,
info)` but passes `post: obj`, which is undefined and causes the copied
example to fail immediately.

Closes #4765.

## Validation

- `npx --yes prettier@2.6.2 --check
website/pages/docs/going-to-production.mdx`
- `git diff --check`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: Post_body example in production guide uses undefined obj variable

2 participants