I am having trouble getting data from the API defined in my api datasource settings. Keep getting nulls on the data. I found an article for turning on logging, I did it, but it really makes a mess of the terminal logs. I am mainly interested in seeing if the query client is actually hitting my API(s).
This is what I had turned on, and it was a mess:
const myPlugin = {
// Fires whenever a GraphQL request is received from a client.
async requestDidStart(requestContext) {
console.log(‘Request started! Query:\n’ + requestContext.request.query);
return {
// Fires whenever Apollo Server will parse a GraphQL
// request to create its associated document AST.
async parsingDidStart(requestContext) {
console.log('Parsing started!');
},
// Fires whenever Apollo Server will validate a
// request's document AST against your GraphQL schema.
async validationDidStart(requestContext) {
console.log('Validation started!');
},
};
},
};