@addison
To get the exact GraphQL query into logs, you can use logging middleware or interceptors provided by your GraphQL server or client library. Here are some general steps to achieve this:
- Configure your GraphQL server or client to enable logging of incoming requests and responses. This can usually be done by setting up logging middleware or interceptors.
- Implement a logging function that captures the incoming GraphQL query and related information. You can extract the query text from the request object or response object depending on when you want to log the query (e.g., before or after execution).
- Include the logging function in the middleware or interceptor setup so that it is triggered for each incoming request. This will log the exact GraphQL query along with any additional information you want to include in the logs.
By following these steps, you should be able to capture the exact GraphQL query into logs and track the query execution flow effectively.