From 454fa752e2ff933f5764cee99cb021ffc1056db1 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Thu, 7 Dec 2017 11:05:34 -0700 Subject: [PATCH] fixed template errors --- routes/index.js | 4 ++-- views/graphiql.ejs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/index.js b/routes/index.js index 8f67a5549..3085fcf8e 100644 --- a/routes/index.js +++ b/routes/index.js @@ -87,9 +87,9 @@ router.use('/api/v1/graph/ql', apollo.graphqlExpress(createGraphOptions)); if (process.env.NODE_ENV !== 'production') { // Interactive graphiql interface. - router.use('/api/v1/graph/iql', (req, res) => { + router.use('/api/v1/graph/iql', staticTemplate, (req, res) => { res.render('graphiql', { - endpointURL: `${req.app.locals.BASE_URL}api/v1/graph/ql` + endpointURL: 'api/v1/graph/ql' }); }); diff --git a/views/graphiql.ejs b/views/graphiql.ejs index 5f1759c0d..b6d609de6 100644 --- a/views/graphiql.ejs +++ b/views/graphiql.ejs @@ -50,7 +50,7 @@ } } // We don't use safe-serialize for location, because it's not client input. - var fetchURL = locationQuery(otherParams, '<%= endpointURL %>'); + var fetchURL = locationQuery(otherParams, '<%= BASE_URL %><%= endpointURL %>'); // Defines a GraphQL fetcher using the fetch API. function graphQLFetcher(graphQLParams) {