Skip to content

Commit d5fd645

Browse files
committed
Fix URL reference
1 parent 40b04a3 commit d5fd645

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

javascript_client/src/subscriptions/createActionCableFetcher.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ type SubscriptionIteratorPayload = {
1717
export default function createActionCableFetcher(options: ActionCableFetcherOptions) {
1818
let currentChannel: Subscription | null = null
1919
const consumer = options.consumer
20+
const url = options.url
2021

2122
const subscriptionFetcher = async function*(graphqlParams: any, fetcherOpts: any) {
2223
let isSubscription = false;
@@ -75,7 +76,7 @@ export default function createActionCableFetcher(options: ActionCableFetcherOpti
7576
} else {
7677
const fetchFn = options.fetch || window.fetch
7778
// Not a subscription fetcher, post to the given URL
78-
yield fetchFn("/graphql", {
79+
yield fetchFn(url, {
7980
method: "POST",
8081
body: JSON.stringify({
8182
query: graphqlParams.query,

0 commit comments

Comments
 (0)