Skip to content

Commit 93fd145

Browse files
committed
minor cleanup
1 parent 8dfde38 commit 93fd145

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

guides/javascript_client/urql_subscriptions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const client = new Client({
3535

3636
```js
3737
import { createConsumer } from "@rails/actioncable";
38-
import createActionCableFetcher from "graphql-ruby-client/subscriptions/createActionCableFetcher";
3938
import createUrqlActionCableSubscription from "graphql-ruby-client/subscriptions/createUrqlActionCableSubscription";
4039

4140
const actionCable = createConsumer('ws://127.0.0.1:3000/cable');

javascript_client/src/subscriptions/createUrqlActionCableSubscription.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ const createUrqlActionCableSubscription = {
1818
this.perform("execute", { query: operation.query, variables: operation.variables });
1919
},
2020
disconnected() {
21-
console.log("Subscription disconnected");
21+
console.warn("Subscription disconnected");
2222
},
2323
received(data: any) {
2424
if (data?.result?.errors) {
2525
error(data.errors);
2626
}
2727
if (data?.result?.data) {
28-
next(data.result)
28+
next(data.result);
2929
}
3030
if (!data.more) {
31-
complete()
31+
complete();
3232
}
3333
}
3434
})

0 commit comments

Comments
 (0)