Skip to content

Commit

Permalink
Merge pull request #2 from mcg-web/supports-webonyx-graphql-sync-prom…
Browse files Browse the repository at this point in the history
…ise-adapter

Add Webonyx/graphql-php promise adapter
  • Loading branch information
mcg-web committed Feb 9, 2017
2 parents e956eea + 62e87d5 commit 8ae36bc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This library requires PHP >= 5.5 to work.
### Download the Bundle

```
composer require ovenblog/dataloader-bundle
composer require overblog/dataloader-bundle
```

### Enable the Bundle
Expand Down Expand Up @@ -79,6 +79,12 @@ This example will create 3 loaders as services:
- "@overblog_dataloader.posts_loader"
- "@overblog_dataloader.images_loader" create using custom factory function "my_factory"

Here the list of existing promise adapters:

* **[ReactPhp/Promise](https://github.com/reactphp/promise)**: overblog_dataloader.react_promise_adapter
* **[GuzzleHttp/Promises](https://github.com/guzzle/promises)**: overblog_dataloader.guzzle_promise_adapter
* **[Webonyx/GraphQL-PHP](https://github.com/webonyx/graphql-php) Sync Promise**: overblog_dataloader.webonyx_graphql_sync_promise_adapter

## License

Overblog/DataLoaderBundle is released under the [MIT](https://github.com/overblog/dataloader-bundle/blob/master/LICENSE) license.
9 changes: 9 additions & 0 deletions Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ services:
overblog_dataloader.guzzle_http_promise_adapter:
public: false
class: Overblog\PromiseAdapter\Adapter\GuzzleHttpPromiseAdapter

overblog_dataloader.webonyx_graphql_sync_promise_adapter:
public: false
class: Overblog\PromiseAdapter\Adapter\WebonyxGraphQLSyncPromiseAdapter
arguments:
- "@webonyx_graphql.sync_promise_adapter"

webonyx_graphql.sync_promise_adapter:
class: Overblog\DataLoader\Promise\Adapter\Webonyx\GraphQL\SyncPromiseAdapter
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"require": {
"php": "^5.5|^7.0",
"overblog/dataloader-php": "^0.3.0",
"overblog/dataloader-php": "^0.4.0",
"symfony/framework-bundle": "^2.7|^3.1"
},
"require-dev": {
Expand All @@ -35,7 +35,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "0.1-dev"
"dev-master": "0.2-dev"
}
}
}

0 comments on commit 8ae36bc

Please sign in to comment.