https://github.com/graycoreio/magento2-graphql-logger
Unique GraphQl queries for development purposes along with when the query was last run.
https://github.com/graycoreio/magento2-graphql-logger
development graphql logging magento magento2
Last synced: about 1 year ago
JSON representation
Unique GraphQl queries for development purposes along with when the query was last run.
- Host: GitHub
- URL: https://github.com/graycoreio/magento2-graphql-logger
- Owner: graycoreio
- License: mit
- Created: 2022-07-26T12:12:48.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-11T16:28:58.000Z (about 1 year ago)
- Last Synced: 2025-04-11T17:24:07.255Z (about 1 year ago)
- Topics: development, graphql, logging, magento, magento2
- Language: PHP
- Homepage:
- Size: 59.6 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Magento 2 GraphQL Logger
[](https://packagist.org/packages/graycore/magento2-graphql-logger/stats)
[](https://packagist.org/packages/graycore/magento2-graphql-logger)
[](https://github.com/graycoreio/magento2-graphql-logger/blob/main/LICENSE)
[](https://github.com/graycoreio/magento2-graphql-logger/actions/workflows/integration.yaml)
This module logs unique GraphQl queries for development purposes.
> [!CAUTION]
> If your frontend development teams are unscrupulous this package will generate a PII issue for you. We append full query body data into the logs. This means that developers who fail to use variables in their queries and instead embed them directly in the query will cause your logs to be pull of various kinds of data that you don't want to log (potentially PII and credit card data). This uses the same interface as New Relic (which means New Relic and any other configured loggers) will ALSO get this data. You should only install this in development environments. You have been warned.
## Getting Started
This module is intended to be installed with [composer](https://getcomposer.org/). From the root of your Magento 2 project:
1. Download the package
```bash
composer require graycore/magento2-graphql-logger
```
2. Enable the package
```bash
./bin/magento module:enable Graycore_GraphQlLogger
```
## Usage
This module is disabled by default. It can be enabled through system configuration: Services -> Magento Web API -> GraphQl Logger -> Enable Logger.
Logs can be found in `graycore_graphql_log` in the database.