chore(docs): fix nullabillity guard docs (#575)

This commit is contained in:
Jack Tan 2020-10-28 03:57:11 +13:00 committed by GitHub
parent 9bfdf2cdc5
commit 2aaaf5cb9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ This plugin helps us guard against non-null values crashing our queries in produ
import { nullabilityGuardPlugin } from '@nexus/schema'
const guardPlugin = nullabilityGuardPlugin({
onNullGuarded(ctx, info) {
onGuarded({ ctx, info }) {
// This could report to a service like Sentry, or log internally - up to you!
console.error(
`Error: Saw a null value for non-null field ${info.parentType.name}.${info.fieldName} ${