Skip to main content

Gateway

Gateway configuration:

Sample Config

kind: Gateway
name: federated_service_name
spec:
composition: ApolloFederation_v1
services:
- name: service_one
url: http://service_one:80/query
schema_files:
- ../graphql/service_one.graphql

- name: service_two
url: http://service_two:80/query
schema_files:
- ../service_two.graphql

- name: service_three
url: http://service_three:80/query
schema_files:
- ../service_three.graphql

Spec

This section defines the format of Inigo's Gateway type configuration files. Fields marked as required must be specified if the parent is defined.

FieldTypeDescription
compositionstring default:noneComposition type of choice.

One of:
- none: No composition.
- ApolloFederation_v1: Apollo Federation v1.
- ApolloFederation_v2: Apollo Federation v2.
services[SubService]List of sub-services.

SubService

FieldTypeDescription
namestring requiredSubgraph name.
enabledboolean default:trueSubgraph is enabled by default. Disabling subgraph will remove if from the gateway and thus from the composition.
urlstring requiredService URL for gateway to reach the service.
schema_files[string]Relative path to the filesystem location of your files containing GraphQL schemas.
For example: ../../schemas/prod.graphql.