README.md in rack-graphql-2.0.0 vs README.md in rack-graphql-2.1.0
- old
+ new
@@ -21,14 +21,15 @@
Add following to your `config.ru` file:
```ruby
run RackGraphql::Application.call(
- schema: YourGraqphqlSchema, # required
- app_name: 'your-service-name', # optional, used for health endpoint content
- context_handler: YourGraphqlContextHandler, # optional, empty `proc` by default
- health_route: true, # optional, true by default
- logger: A9n.logger, # optional, not set by default
+ schema: YourGraqphqlSchema, # required
+ app_name: 'your-service-name', # optional, used for health endpoint content
+ context_handler: YourGraphqlContextHandler, # optional, empty `proc` by default
+ log_exception_backtrace: !A9n.env.production?, # optional, `true` default
+ health_route: true, # optional, true by default
+ logger: A9n.logger, # optional, not set by default
)
```
`context_handler` can be a class, object or proc. It must respond to `call` method taking `env` as an argument. It is supposed to decode or transform request properties to graphql context (eg. jwt token to user object, as shown on an example below).