README.md in rack-graphql-1.2.5 vs README.md in rack-graphql-2.0.0.rc

- old
+ new

@@ -25,10 +25,11 @@ 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 ) ``` `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). @@ -65,9 +66,17 @@ UserRepo.find_by_id(payload['user_id']) end end end +``` + +### Logging exception backtrace + +RackGraphql catches all errors and respond with 500 code. By default it adds exception backtrace to the response body. If you don't want to have the backtrace in the response set: + +``` +RackGraphql.log_exception_backtrace = false ``` ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/RenoFi/rack-graphql. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.