Skip to content

Commit

Permalink
Merge pull request #79 from cam-perry/patch-1
Browse files Browse the repository at this point in the history
Make README usage example include default handlers
  • Loading branch information
nodkz authored May 13, 2022
2 parents ea22095 + 75ddeb8 commit 86e9b7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
```js
import ConnectionHandler from 'relay-connection-handler-plus';
import { Environment } from 'relay-runtime';
import RelayDefaultHandlerProvider from "relay-runtime/lib/handlers/RelayDefaultHandlerProvider";

function handlerProvider(handle) {
switch (handle) {
case 'connection':
return ConnectionHandler;
default:
throw new Error(`no handler configured for ${handle}`);
return RelayDefaultHandlerProvider(handle);
}
}

Expand Down

0 comments on commit 86e9b7a

Please sign in to comment.