Skip to main content

Inigo Apollo Gateway Setup Guide

This guide summarizes a setup process for using Apollo Gateway with Inigo, including the creation of an Inigo account, setting up the Inigo service, installing the Inigo agent into Apollo Gateway, and getting started with Inigo Observability. After completing these initial steps, you can implement the more advanced features of Inigo, such as schema composition, breaking change checks, rate limiting, and more.

Part 1. Inigo Account and Inigo Service Creation

Our Getting Started Guide contains detailed information about creating an account with Inigo and creating your first Inigo Service. For the initial setup, only the Inigo Cloud UI is needed. Here is a summary of the required steps:

StepInstructionsDetails
#1Create an account using Google SSO, GitHub SSO, or email/password (app.inigo.io).
#2After creating the account, you will be taken to our Getting Started guide workflow.
#3Next, you can proceed to Create a service and enter the details for your Apollo Gateway service deployment.
  • Service name: spacex
  • Service label: staging
  • GraphQL server: Javascript Apollo Gateway
.
#4After the service is created, a token value will be created. Please copy and save this token value, as it will be used later for setting up your Apollo Gateway.

Part 2. Apollo Gateway Inigo Agent Installation

The Agent installation instructions for Apollo Gateway document details the basic setup of Apollo Gateway with the Inigo agent. This will provide out-of-the-box observability for your supergraph to get started with Inigo.

StepInstructionsDetails
#1Install inigo-js using NPM.npm install inigo.js
#2Install your platform-specific Inigo library. Available libraries:
  • inigo-linux-amd64
  • inigo-linux-arm64
  • inigo-darwin-amd64
  • inigo-darwin-arm64
  • inigo-windows-amd64
npm install inigo-linux-amd64
#3In your Apollo Gateway JavaScript code, include the InigoPluginimport { InigoPlugin } from "inigo.js";
#4In your Apollo Gateway JavaScript code, there will be an ApolloServer object created. Import the InigoPlugin for ApolloServer.const server = new ApolloServer({
// ...
plugins:[InigoPlugin()],
// ...
});
#5Configure the Inigo Service Token. You may use a .env or set an INIGO_SERVICE_TOKEN environment variable on your terminal or script to run Apollo Gateway.INIGO_SERVICE_TOKEN="inigo-service-token" npm start
#6The Apollo Gateway will be started, and the Inigo agent will connect back to the Inigo cloud.Watch the logs for information related to the Inigo plugin.

Part 3. First Observability Data (for Supergraph)

Now that your Apollo Gateway is running and the Inigo agent is installed and connected to the Inigo cloud, you can run GraphQL queries and begin to receive Observability data for those queries.

StepInstructionsDetails
#1Go to app.inigo.io and proceed to your Inigo service created in Part 1.
#2Execute a series of GraphQL queries to your Apollo Gateway instance. The Inigo agent will begin capturing query metrics, and they will show up momentarily.

OPTIONAL: Set up Inigo Explorer (doc) as your GraphQL playground to edit and run queries.
#3Proceed to the Insights screen and click the Refresh button on the top right of the screen. Data might take a minute to render.
#4Proceed to the Observe screen to see GraphQL query data, and you can proceed to filter and group data.

Part 4. Configure Inigo Service Context for JWT or Headers

Configure Users ID, Clients, IP, and Org that map to JWT claims or HTTP Headers. This will provide granularity for client-specific data

StepInstructionsDetails
#1Install Inigo CLIbrew tap inigolabs/homebrew-tap
brew install inigo_cli
#2Log in to Inigo CLIEx. inigo login google
#3Create Service config file (sample file) with:
  • Updated service name and label
  • JWT and headers information
Example:
- path_user_id: jwt.user_name
- path_organization_id: jwt.org_id
- path_client_info: "header.Inigo-Client-Version"
- path_client_address: "header.CF-Connecting-IP"
#4Apply configuration using Inigo CLI command inigo apply service.yml

Coming soon...

  • Part 5. Config subgraphs and schema checks
  • Part 6. Subgraph Observability and Tracing
  • Part 7: CI/CD Integration