mirror of
https://github.com/wassname/talk.git
synced 2026-08-11 11:27:10 +08:00
Use absolute graphql url to fix ie11 bug (#2823)
* fix: use absolute graphql to fix ie11 bug * fix: improved url composition
This commit is contained in:
@@ -56,8 +56,8 @@ interface CreateContextArguments {
|
||||
|
||||
/** websocketURL points to our live graphql server */
|
||||
const websocketURL = `${location.protocol === "https:" ? "wss" : "ws"}://${
|
||||
location.hostname
|
||||
}:${location.port}/api/graphql/live`;
|
||||
location.host
|
||||
}/api/graphql/live`;
|
||||
|
||||
/**
|
||||
* timeagoFormatter integrates timeago into our translation
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
} from "react-relay-network-modern/es";
|
||||
|
||||
import TIME from "coral-common/time";
|
||||
import getLocationOrigin from "coral-framework/utils/getLocationOrigin";
|
||||
|
||||
import clientIDMiddleware from "./clientIDMiddleware";
|
||||
import { ManagedSubscriptionClient } from "./createManagedSubscriptionClient";
|
||||
@@ -16,7 +17,7 @@ import persistedQueriesGetMethodMiddleware from "./persistedQueriesGetMethodMidd
|
||||
|
||||
export type TokenGetter = () => string;
|
||||
|
||||
const graphqlURL = "/api/graphql";
|
||||
const graphqlURL = `${getLocationOrigin()}/api/graphql`;
|
||||
|
||||
function createSubscriptionFunction(
|
||||
subscriptionClient: ManagedSubscriptionClient
|
||||
|
||||
Reference in New Issue
Block a user