Use the Edge Proxy for GraphQL Metrics
You can collect GraphQL Metrics by setting up the Stellate Edge Proxy. This allows you to assess the impact of Stellate Edge Caching on performance and potential cost savings. Analyzing these metrics before implementing Edge Caching helps determine if it is advantageous for your GraphQL API needs.
You can set up the Stellate Edge Proxy for collecting metrics either without enabling caching or with caching enabled. When you enable caching you get additional metrics related to observability about caching performance.
Before you begin
Before you can view metrics using the Stellate Edge Proxy, you need to have the following in place:
- A Stellate.co account and login.
- A GraphQL server and client setup. Using our Edge Proxy metrics in your production environment gives you the most accurate data, however, you can also start off using the Edge Proxy in a staging or test environment.
- An endpoint for your service.
You should also read the introductory GraphQL Metrics topic.
Set up the Stellate Edge Proxy
Setting up the Stellate Edge Proxy is straightforward. You can find the details in our Stellate Quickstart Guide. You can get the full benefits of Stellate's GraphQL Metrics, just by using Stellate as a proxy in front of your GraphQL Backend.
To do this, just create a Stellate service that points to your GraphQL server. Your service in this state won't have any configuration added yet. Without further configuration, you can already get the full benefits of Stellate's GraphQL Metrics, just by using Stellate as a proxy in front of your GraphQL backend server.
For more details, read the Stellate Quickstart Guide.
Configure the Edge Proxy to disable caching
When you set up the Stellate Edge Proxy for caching, if you don’t set up caching rules for your service, caching is not enabled. If you do have caching rules set up you can collect metrics without caching by disabling caching.
In the Stellate UI, you can modify the configuration fields to disable caching. To do this:
- Navigate to your Service >Config tab > Config editor.
- Set the
passThroughOnly
field totrue
to disable caching. For example:
import { Config } from 'stellate'
const config: Config = {
config: {
name: 'stellate-public',
originUrl: 'https://api.stellate.co/api/public',
schema: './types/public.graphql',
passThroughOnly: true,
Once disabled, the Edge Proxy only collect metrics and you can analyze the metrics and determine if edge caching is optimal for your organization.
Discover more