From e32bbb726da5c8476487099bfa518921168396b5 Mon Sep 17 00:00:00 2001
From: "David B. Nagle" <nagledb@gmail.com>
Date: Wed, 10 Oct 2018 20:01:12 -0700
Subject: [PATCH] Updated default field resolver code in documentation.

Updated code to match definition in GraphQL\Executor\Executor::defaultFieldResolver. Change is notable because previous version did not indicate that the closure receives the $info variable.
---
 docs/data-fetching.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/data-fetching.md b/docs/data-fetching.md
index df357d0..4bc0cfb 100644
--- a/docs/data-fetching.md
+++ b/docs/data-fetching.md
@@ -118,7 +118,7 @@ function defaultFieldResolver($source, $args, $context, \GraphQL\Type\Definition
         }
     }
 
-    return $property instanceof \Closure ? $property($source, $args, $context) : $property;
+    return $property instanceof Closure ? $property($source, $args, $context, $info) : $property;
 }
 ```
 
@@ -270,4 +270,4 @@ Where **$promiseAdapter** is an instance of:
 * Other platforms: write your own class implementing interface: <br> 
   [`GraphQL\Executor\Promise\PromiseAdapter`](reference.md#graphqlexecutorpromisepromiseadapter). 
 
-Then your **resolve** functions should return promises of your platform instead of `GraphQL\Deferred`s.
\ No newline at end of file
+Then your **resolve** functions should return promises of your platform instead of `GraphQL\Deferred`s.