From 80c65082b28bb234ea92fedd0acc0b4507d89dd8 Mon Sep 17 00:00:00 2001 From: Minh Vu Date: Mon, 25 May 2026 15:13:58 +0200 Subject: [PATCH] docs: fix Post_body example variable (#4767) ## 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` --- website/pages/docs/going-to-production.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/pages/docs/going-to-production.mdx b/website/pages/docs/going-to-production.mdx index 2af1e0b7ab..aa57121dc0 100644 --- a/website/pages/docs/going-to-production.mdx +++ b/website/pages/docs/going-to-production.mdx @@ -149,7 +149,7 @@ const postRepository = { // Resolver for the `Post.body` field: function Post_body(source, args, context, info) { // return the post body only if the user is the post's author - return postRepository.getBody({ user: context.user, post: obj }) + return postRepository.getBody({ user: context.user, post: source }) } ```