Logging
This features uses @totalsoft/apollo-logger which comes with an Apollo logging plugin, that helps you monitor the execution of your GraphQL operations with the use of the request life-cycle events.
Read more about Apollo Server plugins here: Plugins
If desired, the logs can be persisted in a database, file or somewhere else, see documentation for more details.
This generator wishes to provide an example of saveLogs
implementation that can be found in utils/logging.js
file.
The provided helper function for logging persistence, requires the following __Logs
table to be created in your database.
In addition, the errors thrown inside Apollo Server, can be wrapped in a 'user friendly message'. This increases the security of your application by making sure there are no sensitive data leaks. To activate this feature, use the securedMessages: true
option when instantiating the plugin:
Last updated