GuardQL is a debugging and performance monitoring tool that logs GraphQL API errors, tracks slow query execution times, and provides a central dashboard with search and filtering functionality for multiple projects.
Table of Contents
Debugging GraphQL APIs can be difficult, especially when trying to pinpoint errors in slow or inefficient queries. GuardQL streamlines this process by providing a comprehensive debugging and performance monitoring tool designed for pre-production environments. It seamlessly integrates into GraphQL APIs to provide insights and optimization tools.
- ✅ Captures GraphQL API errors with detailed logs
- ✅ Monitors query execution times to detect inefficiencies
- ✅ Offers an intuitive dashboard for visualizing key performance metrics
- ✅ Enables users to create and manage multiple projects with a dropdown selection
With GuardQL, developers gain visibility into their GraphQL queries, making it easier to diagnose issues and optimize performance.
- Error Logging: Captures GraphQL API errors, complete with timestamps and detailed error messages.
- Query & Mutation Context: Provides full visibility into which GraphQL query or mutation caused the error, along with stack trace details.
- Slow Query Identification: Automatically flags GraphQL queries that take longer than a set threshold, helping pinpoint performance bottlenecks.
- Comprehensive Query Performance Tracking: Logs execution times for all queries, not just slow ones, offering a complete overview of GraphQL performance.
- User-Friendly Interface: Built for fast debugging and troubleshooting with a clean, easy-to-navigate UI.
- Effortless Setup: A lightweight NPM package that integrates smoothly into any GraphQL project with minimal configuration.
- Automated Logging: Instantly starts tracking errors and performance metrics without requiring additional setup.
- Create an account to gain access to the GuardQL Dashboard.
- Upon signup, you'll receive a unique API key, which is required for configuring the plugin.
- Inside the dashboard, create a new project using the project dropdown.
- Select your project to start tracking GraphQL request performance and error logs.
- Add GuardQL to your application by running:
npm install guardql-plugin
- Integrate GuardQL into your Apollo Server setup by adding the plugin and providing:
- Your project name
- The API key from your dashboard
- Any query execution time thresholds for slow query detection
import { ApolloServer } from '@apollo/server'; import { guardqlPlugin } from 'guardql-plugin'; const server = new ApolloServer({ typeDefs, resolvers, plugins: [ guardqlPlugin({ apiKey: 'your-api-key', projectName: 'your-project-name', slowQueryThreshold: 1000 // in milliseconds }) ] });
- Start your server and begin making GraphQL requests as usual.
- Access the GuardQL Dashboard to track:
- Query execution times
- GraphQL errors with stack traces
- Performance trends and slow query alerts
We welcome contributions!
If you’d like to contribute:
- Fork this repository
- Create a feature branch
git checkout -b feature-branch-name
- Commit your changes
git add .
git commit -m "Added new feature XYZ"
- Push to your branch
git push origin feature-branch-name
- Create a pull request
For major changes, please open an issue first to discuss what you’d like to change.
Distributed under the MIT License.
We would like to thank the following resources that helped make GuardQL possible:
- Material-UI - Used for designing UI components
- Canva - Used to help create logo
Special thanks to the entire GuardQL team for their hard work and dedication into making GuardQL a reality! ✨