Skip to main content

Logger

You can improve the development experience using a Logger of your GQless usage, which will print relevant information about the requests made to your GraphQL API Server.

Logger screenshot

Installation#

npm install @gqless/logger

Usage#

import { client } from '../gqless';
if (process.env.NODE_ENV === 'development') {
import('@gqless/logger').then(({ createLogger }) => {
const logger = createLogger(client, {
// Custom options...
});
logger.start();
});
}

Options#

NameTypeDefault ValueDescription
showSelectionsbooleantrueShow "selections" in logs
showCachebooleantrueShow cache snapshots in logs
stringifyJSONbooleanfalseStringify JSON before printing it
Last updated on by Pablo Sáez