Docs

Live API Proxy & Interception

Extend your existing backend APIs without managing multiple endpoint URLs. MockQL works as a proxy that can intercept, modify, and enhance API requests while maintaining connections to your production services.

How Proxy Interception Works

MockQL sits between your application and backend as a transparent proxy, allowing you to intercept and modify API requests without changing your application code or endpoint URLs.

Key Advantages of Proxy-Based Mocking

  • Uses your existing API URLs - no need to change frontend code
  • Selectively modify only the endpoints you want to change
  • Create missing endpoints while backend development is in progress
  • Transform responses without touching your backend code
1

Client Request

App sends request to original URL

2

MockQL Proxy

Intercepts and processes request

3

Backend API

Request forwarded to real API

4

Modified Response

Enhanced response returned to app

MockQL proxy intercepting requests to an external API
MockQL proxy intercepting requests to an external API

REST API Extensions

Create missing endpoints or modify existing ones while maintaining your original API structure. This lets you develop against future API features or test changes before they're implemented in your backend.

Common Use Cases

Missing Endpoints

Add new endpoints that don't exist yet in your backend:

https://myproductionapi.com/api/v1/posts ✓
https://myproductionapi.com/api/v1/comments ✗
// Add the missing /comments endpoint
Creating a new endpoint on top of existing API
Creating a new endpoint on top of existing API

Key Benefits

Prototype with real data from production

Test migrations before backend changes

Fix backend issues in frontend development

Develop offline with simulated responses

GraphQL Field Extensions

Extend your GraphQL schema by adding new fields to existing types, creating entirely new queries, or modifying existing field definitions. MockQL merges these changes with data from your original backend.

Schema Extension Concept

With MockQL, you can define a schema "diff" that adds new fields to existing GraphQL types. When a query is made, MockQL will:

1.Intercept the GraphQL request
2.Pass it to your original backend
3.Generate mock data for your custom fields
4.Merge the mocked data with the original response

How It Works

  1. Define schema extensions with fields you want to add
  2. Add @mock directives to generate realistic test data
  3. MockQL merges these fields with original response data
  4. Extensions appear in introspection queries automatically

GraphQL Response

With custom_value field added:
{
  "data": {
    "listAllCategories": {
      "categories": [
        {
          "id": "1",
          "name": "Electronics",
          "custom_value": "Ergonomic design with premium materials"
        },
        {
          "id": "2",
          "name": "Clothing",
          "custom_value": "Premium quality sustainable fabric"
        }
      ]
    }
  }
}

Note: Only custom_value is mocked, other fields come from the original backend

GraphQL Features

Add new fields to existing types
Create entirely new queries or mutations
Block specific operations by name
Full introspection support for schema changes

Key Benefits

MockQL's proxy-based approach lets you extend and modify your existing APIs without changing your application code, making it easier to develop, test, and prototype new features.

Use Existing URLs

No need to change endpoints in your application - works with your current API URLs

Selective Mocking

Choose which endpoints to mock while letting others pass through to your real backend

Schema Extensions

Add new fields and operations to your GraphQL API with full introspection support