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.
Field | Type | Description |
---|---|---|
composition | string default:none | Composition 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
Field | Type | Description |
---|---|---|
name | string required | Subgraph name. |
enabled | boolean default:true | Subgraph is enabled by default. Disabling subgraph will remove if from the gateway and thus from the composition. |
url | string required | Service 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 . |