Skip to content

Commit

Permalink
Update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maarten Staa committed Oct 29, 2020
1 parent 5500251 commit c52c18c
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ This library allows integrating your Lighthouse GraphQL project with Apollo Stud
sending tracing statistics and allowing you to send your schema to Apollo for
breaking changes notifications.

## Requirements

- PHP 7.4 or newer
- Tested with Laravel 8 and Lighthouse 4.17

## Installation

First, install the Composer package:
Expand Down Expand Up @@ -33,10 +38,20 @@ public function schedule(\Illuminate\Console\Scheduling\Schedule $schedule)
}
```

## Requirements
## Client tracing

- PHP 7.4 or newer
- Tested with Laravel 8 and Lighthouse 4.17
You can gather information about which clients are calling your GraphQL API. If you have
control over the clients, add the `x-apollo-client-name` and `x-apollo-client-version`
headers to your GraphQL requests, and they will be gathered and sent to Apollo Studio.

If you need more control over client tracing on the server side, you can create your own
custom logic by implementing the `BrightAlley\LighthouseApollo\Contracts\ClientInformationExtractor`
interface, and binding your own implementation to the app container in your service
provider, like so:

```php
$this->app->bind(ClientInformationExtractor::class, MyCustomClientInformationExtractor::class);
```

## Development

Expand Down

0 comments on commit c52c18c

Please sign in to comment.