Description
The example in website/pages/docs/going-to-production.mdx under the authentication/authorization section defines the resolver as function Post_body(source, args, context, info), but the body passes post: obj into postRepository.getBody(...).
Because obj is not defined in the snippet, copying the example throws immediately. It looks like the intended variable is source.
Current snippet
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 })
}
Expected snippet
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: source })
}
History
This appears to have been introduced in PR #4398 (docs: update "going to production" guide).
Description
The example in
website/pages/docs/going-to-production.mdxunder the authentication/authorization section defines the resolver asfunction Post_body(source, args, context, info), but the body passespost: objintopostRepository.getBody(...).Because
objis not defined in the snippet, copying the example throws immediately. It looks like the intended variable issource.Current snippet
Expected snippet
History
This appears to have been introduced in PR #4398 (
docs: update "going to production" guide).