@@ -25,7 +25,7 @@ import schema from './schema';
25
25
import queryMap from '../extracted_queries.json' ;
26
26
import config from './config' ;
27
27
28
- const SUBSCRIPTIONS_PATH = '/subscriptions ' ;
28
+ const WS_GQL_PATH = '/graphql ' ;
29
29
30
30
// Arguments usually come from env vars
31
31
export function run ( {
@@ -41,9 +41,9 @@ export function run({
41
41
port = parseInt ( portFromEnv , 10 ) ;
42
42
}
43
43
44
- const subscriptionsURL = process . env . NODE_ENV !== 'production'
45
- ? `ws://localhost:${ port } ${ SUBSCRIPTIONS_PATH } `
46
- : `ws://api.githunt.com${ SUBSCRIPTIONS_PATH } ` ;
44
+ const wsGqlURL = process . env . NODE_ENV !== 'production'
45
+ ? `ws://localhost:${ port } ${ WS_GQL_PATH } `
46
+ : `ws://api.githunt.com${ WS_GQL_PATH } ` ;
47
47
48
48
const app = express ( ) ;
49
49
@@ -120,7 +120,7 @@ export function run({
120
120
121
121
app . use ( '/graphiql' , graphiqlExpress ( {
122
122
endpointURL : '/graphql' ,
123
- subscriptionsEndpoint : subscriptionsURL ,
123
+ subscriptionsEndpoint : wsGqlURL ,
124
124
query : `{
125
125
feed (type: NEW, limit: 5) {
126
126
repository {
@@ -143,7 +143,7 @@ export function run({
143
143
144
144
server . listen ( port , ( ) => {
145
145
console . log ( `API Server is now running on http://localhost:${ port } ` ) ; // eslint-disable-line no-console
146
- console . log ( `API Subscriptions server is now running on ws://localhost:${ port } ${ SUBSCRIPTIONS_PATH } ` ) ; // eslint-disable-line no-console
146
+ console . log ( `API Server over web socket with subscriptions is now running on ws://localhost:${ port } ${ WS_GQL_PATH } ` ) ; // eslint-disable-line no-console
147
147
} ) ;
148
148
149
149
// eslint-disable-next-line
@@ -228,7 +228,7 @@ export function run({
228
228
} ,
229
229
} ,
230
230
{
231
- path : SUBSCRIPTIONS_PATH ,
231
+ path : WS_GQL_PATH ,
232
232
server,
233
233
} ,
234
234
) ;
0 commit comments