1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-14 23:30:05 +02:00

fix(joyent-cp-frontend): fix fallback gql hostname

This commit is contained in:
Sérgio Ramos 2017-06-07 16:56:07 +01:00
parent ebec51b965
commit b6f6f1b2a8

View File

@ -8,11 +8,12 @@ const GLOBAL = typeof window === 'object'
? window ? window
: { : {
location: { location: {
hostname: 'http://0.0.0.0' hostname: '0.0.0.0'
} }
}; };
const GQL_HOSTNAME = process.env.REACT_APP_GQL_HOSTNAME || GLOBAL; const GQL_HOSTNAME =
process.env.REACT_APP_GQL_HOSTNAME || GLOBAL.location.hostname;
export const client = new ApolloClient({ export const client = new ApolloClient({
dataIdFromObject: o => { dataIdFromObject: o => {