diff --git a/README.md b/README.md index e5aa8dc..98a5ab0 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,7 @@ For example: $myLoader = new DataLoader(function ($keys) { echo json_encode($keys); return someBatchLoadFn($keys); -}, new Option(['cache' => false ])); +}, $promiseAdapter, new Option(['cache' => false ])); $myLoader->load('A'); $myLoader->load('B'); @@ -208,7 +208,7 @@ so later requests will load new values. $myLoader = new DataLoader(function($keys) use ($identityLoader) { $identityLoader->clearAll(); return someBatchLoadFn($keys); -}); +}, $promiseAdapter); ``` @@ -338,15 +338,24 @@ and possibly fewer if there are cache hits. ```php 'User', 'fields' => function () use (&$userType, $userLoader, $dbh) { @@ -376,7 +385,7 @@ $userType = new ObjectType([ } ]); ``` -You can also see [an example](https://github.com/mcg-web/sandbox-dataloader-graphql-php/blob/master/with-dataloader.php). +You can also see [an example](https://github.com/mcg-web/sandbox-dataloader-graphql-php). ## Using with Symfony