chore: change path to GQL-API

This commit is contained in:
2020-01-17 12:44:19 +01:00
parent 4ba66cb103
commit 1e78b86a8a
3 changed files with 3 additions and 11 deletions
-8
View File
@@ -18,14 +18,6 @@ server {
return 200 'Ok'; return 200 'Ok';
} }
location /graph/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://dancefinder;
}
error_log /dev/stdout info; error_log /dev/stdout info;
# redirect server error pages to the static page /50x.html # redirect server error pages to the static page /50x.html
+2 -2
View File
@@ -23,9 +23,9 @@ if (config.dev) {
// Add graphql mocking middleware // Add graphql mocking middleware
//addGraphMiddleware(app); //addGraphMiddleware(app);
app.use('/graph/', proxy('localhost:8081', { app.use('/query/', proxy('localhost:6080', {
proxyReqPathResolver: function (req) { proxyReqPathResolver: function (req) {
return '/graph/'; return '/query';
} }
} }
) )
+1 -1
View File
@@ -5,7 +5,7 @@ const { includeCredentials } = require('./middleware');
import { onError } from 'apollo-link-error'; import { onError } from 'apollo-link-error';
import { default as webAuth} from '../auth'; import { default as webAuth} from '../auth';
const defaultGraphUri = '/graph/'; const defaultGraphUri = '/query/';
const httpLink = new HttpLink({ uri: defaultGraphUri, fetch: includeCredentials, credentials: 'same-origin' }); const httpLink = new HttpLink({ uri: defaultGraphUri, fetch: includeCredentials, credentials: 'same-origin' });
const errorLink = onError(({ graphQLErrors, networkError, operation, forward }) => { const errorLink = onError(({ graphQLErrors, networkError, operation, forward }) => {
if (graphQLErrors) { if (graphQLErrors) {