Skip to content

Uncover, Analyze, and Optimize Your GraphQL Performance

License

Notifications You must be signed in to change notification settings

oslabs-beta/GuardQL

Repository files navigation

GuardQL_Logo

GuardQL Website GuardQL Plugin GitHub Stars GitHub Watchers GitHub Forks

GuardQL

Uncover, Analyze, and Optimize Your GraphQL Performance

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

Technologies

JavaScript TypeScript Apollo-GraphQL GraphQL Postgres Supabase Express.js NodeJS NPM HTML5 CSS3 MUI React React Router React Hook Form Webpack

Introduction

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.

Features

🚨 Real-time GraphQL Error Tracking & Debugging

  • 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.

🎯 Performance Monitoring & Query Optimization

  • 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.

📊 Intuitive & Insightful Dashboard

  • User-Friendly Interface: Built for fast debugging and troubleshooting with a clean, easy-to-navigate UI.

🚀 Seamless GraphQL Integration via NPM Plugin

  • 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.

Initial Set-up and Installation

1️⃣ Sign Up & Get Your API Key

  • 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. signup

2️⃣ Create & Select a Project

  • Inside the dashboard, create a new project using the project dropdown.
  • Select your project to start tracking GraphQL request performance and error logs. projects

3️⃣ Install the GuardQL NPM Package

  • Add GuardQL to your application by running: npm install guardql-plugin

4️⃣ Configure the Plugin in Apollo Server

  • 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
           })
        ]
    });
    

5️⃣ Run Your Application

  • Start your server and begin making GraphQL requests as usual.

6️⃣ Monitor Your API in Real-Time

  • Access the GuardQL Dashboard to track:
    • Query execution times
    • GraphQL errors with stack traces
    • Performance trends and slow query alerts

Contributions

We welcome contributions!

If you’d like to contribute:

  1. Fork this repository
  2. Create a feature branch
    • git checkout -b feature-branch-name
  3. Commit your changes
    • git add .
    • git commit -m "Added new feature XYZ"
  4. Push to your branch
    • git push origin feature-branch-name
  5. Create a pull request

For major changes, please open an issue first to discuss what you’d like to change.

Contact Us

Static Badge

GuardQL Team

Static Badge Static Badge LinkedIn

Static Badge Static Badge LinkedIn

Static Badge Static Badge LinkedIn

Static Badge Static Badge LinkedIn

Static Badge Static Badge LinkedIn

License

Distributed under the MIT License.

Acknowledgements

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! ✨

Return to top