File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
packages/ghost-graphql/src Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3,3 +3,5 @@ export const API_VERSION = process.env.GHOST_API_VERSION || 'v3';
33export const API_URL =
44 process . env . GHOST_API_URL ||
55 `${ process . env . GHOST_URL } /ghost/api/${ API_VERSION } /content` ;
6+ export const SHOULD_LOG_API_URL =
7+ process . env . GHOST_SHOULD_LOG_API_URL === 'true' ;
Original file line number Diff line number Diff line change 11import { RESTDataSource } from 'apollo-datasource-rest' ;
2- import { API_KEY , API_URL } from '../constants' ;
2+ import { API_KEY , API_URL , SHOULD_LOG_API_URL } from '../constants' ;
33import BrowseArgumentsInterface from '../interfaces/BrowseArguments' ;
44import ReadArgumentsInterface from '../interfaces/ReadArguments' ;
55import getBrowseArguments from '../helpers/getBrowseArguments' ;
@@ -8,6 +8,9 @@ export default class ResourceDataSource extends RESTDataSource {
88 constructor ( ) {
99 super ( ) ;
1010 this . baseURL = `${ API_URL } ` ;
11+ if ( SHOULD_LOG_API_URL ) {
12+ console . log ( 'API_URL' , API_URL ) ;
13+ }
1114 }
1215
1316 browse ( browseArguments : BrowseArgumentsInterface ) {
You can’t perform that action at this time.
0 commit comments