diff --git a/app/src/RelayEnvironment.ts b/app/src/RelayEnvironment.ts index 18fe0ef410..7db54cc96b 100644 --- a/app/src/RelayEnvironment.ts +++ b/app/src/RelayEnvironment.ts @@ -6,7 +6,10 @@ import { Store, } from "relay-runtime"; -const graphQLPath = window.Config.basename + "graphql"; +function getSanitizedPath(path: string): string { + return path.endsWith("/") ? path.slice(0, -1) : path; +} +const graphQLPath = getSanitizedPath(window.Config.basename) + "/graphql"; /** * Relay requires developers to configure a "fetch" function that tells Relay how to load * the results of GraphQL queries from your server (or other data source). See more at