Fix ui graphql endpoint env var
This commit is contained in:
parent
d6366f8467
commit
8f7e50c4ba
|
@ -1,9 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
client: {
|
|
||||||
service: {
|
|
||||||
name: 'graphql endpoint',
|
|
||||||
url: process.env.GRAPHQL_ENDPOINT || 'http://localhost:4001/graphql',
|
|
||||||
skipSSLValidation: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -8,12 +8,17 @@ import { ApolloLink, split } from 'apollo-link'
|
||||||
import { getMainDefinition } from 'apollo-utilities'
|
import { getMainDefinition } from 'apollo-utilities'
|
||||||
|
|
||||||
const httpLink = new HttpLink({
|
const httpLink = new HttpLink({
|
||||||
uri: process.env.REACT_APP_GRAPHQL_URI,
|
uri: process.env.GRAPHQL_ENDPOINT,
|
||||||
credentials: 'same-origin',
|
credentials: 'same-origin',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log('GRAPHQL ENDPOINT', process.env.GRAPHQL_ENDPOINT)
|
||||||
|
|
||||||
|
let websocketUri = new URL(process.env.GRAPHQL_ENDPOINT)
|
||||||
|
websocketUri.protocol = 'ws'
|
||||||
|
|
||||||
const wsLink = new WebSocketLink({
|
const wsLink = new WebSocketLink({
|
||||||
uri: `ws://localhost:4001/graphql`,
|
uri: websocketUri,
|
||||||
credentials: 'same-origin',
|
credentials: 'same-origin',
|
||||||
options: {
|
options: {
|
||||||
reconnect: true,
|
reconnect: true,
|
||||||
|
|
Loading…
Reference in New Issue