Skip to content

Commit edaa68e

Browse files
leifhanackclaude
andcommitted
docs: overhaul README for clarity and operator usefulness
The previous README was written for contributors — it buried the Quick Start behind Repository Layout, omitted critical steps (unzip, launcher path), and left readers without a working gateway at the end of it. Changes: Intro: link GraphQL Java with credibility anchors (Spring GraphQL, Netflix DGS) and add a paragraph explaining why JVM-native matters for Java-centric enterprises. Section order: Requirements and Quick Start now come before Repository Layout, which is contributor context rather than operator context. Quick Start: replaced the three-build-command stub with an end-to-end flow that takes a reader from zero to a running federated graph — inline subgraph definitions, build, extract (with the missing unzip step added), configure, start, upload. Fixed the launcher path from ./feddi-gateway to bin/feddi-gateway inside the extracted directory. Dropped the redundant bootJar step and the misplaced test-suite step. Configuration: moved the extensions note into the table row where it belongs, documented GET /actuator/health as the primary health check URL, noted that each upload replaces the active definition immediately, and fixed an incorrect extension-api path in Running Tests. Attribution: added closing line crediting Andi Marek and the feddi team. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ea2502e commit edaa68e

1 file changed

Lines changed: 91 additions & 23 deletions

File tree

README.md

Lines changed: 91 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,71 @@
66

77
# feddi Gateway
88

9-
feddi Gateway is a JVM-native GraphQL federation gateway, implementing the [GraphQL Composite Schemas Spec](https://github.com/graphql/composite-schemas-spec). It composes source schemas, plans cross-subgraph operations, and executes GraphQL requests against a unified schema.
9+
feddi Gateway is a JVM-native GraphQL federation gateway built on [GraphQL Java](https://github.com/graphql-java/graphql-java) — the foundation of Spring GraphQL, Netflix DGS, and thousands of enterprise deployments.
1010

11-
This repository is an open source project and can be used independently of the [feddi Platform](https://feddi.dev). You can run it as a standalone feddi Gateway with your own feddi Gateway definition source, your own subgraph client integration, or the built-in ZIP upload flow.
11+
It implements the [GraphQL Composite Schemas Spec](https://github.com/graphql/composite-schemas-spec), composes source schemas, plans cross-subgraph operations, and executes GraphQL requests against a unified schema — entirely inside the JVM.
1212

13-
It works best overall when used together with the feddi Platform. For full documentation on running the feddi Gateway with the feddi Platform — including pre-built binaries — see [feddi.dev/get-started](https://feddi.dev/get-started).
13+
Federation gateways sit on the critical path for every GraphQL request. For Java-centric enterprises, running that infrastructure outside the JVM means rebuilding security, policy enforcement, and compliance controls in a foreign runtime. feddi Gateway eliminates that split.
1414

15-
## Repository Layout
15+
This repository is an open source project and can be used independently of the [feddi Platform](https://feddi.dev). You can run it as a standalone feddi Gateway with your own feddi Gateway definition source, your own subgraph client integration, or the built-in ZIP upload flow.
1616

17-
- `gateway/engine` - Composition, validation, query planning, and execution
18-
- `gateway/app` - Spring Boot application that serves the feddi Gateway over HTTP
19-
- `gateway/extension-api` - Public extension API for integrating gateway behavior
20-
- `e2e-tests` - Docker-based end-to-end tests
21-
- `scripts` - Helper scripts for common local workflows
17+
It works best overall when used together with the feddi Platform. For full documentation on running the feddi Gateway with the feddi Platform — including pre-built binaries — see [feddi.dev/get-started](https://feddi.dev/get-started).
2218

2319
## Requirements
2420

25-
- Java 25
21+
- Java 25 or later
2622
- Docker, for `e2e-tests`
2723

2824
## Quick Start
2925

30-
Run the core test suite:
26+
From the repository root, create a minimal two-subgraph definition:
3127

3228
```bash
33-
cd gateway
34-
./gradlew test integrationTest
29+
mkdir -p subgraphs/products subgraphs/reviews
30+
```
31+
32+
`subgraphs/products/schema.graphqls`:
33+
34+
```graphql
35+
type Query {
36+
product(id: ID!): Product
37+
}
38+
39+
type Product {
40+
id: ID!
41+
name: String!
42+
}
43+
```
44+
45+
`subgraphs/products/config.yaml`:
46+
47+
```yaml
48+
url: http://localhost:4001/graphql
49+
```
50+
51+
`subgraphs/reviews/schema.graphqls`:
52+
53+
```graphql
54+
type Query {
55+
review(id: ID!): Review
56+
}
57+
58+
type Review {
59+
id: ID!
60+
body: String!
61+
}
3562
```
3663

37-
Build the runnable application JAR:
64+
`subgraphs/reviews/config.yaml`:
65+
66+
```yaml
67+
url: http://localhost:4002/graphql
68+
```
69+
70+
Package them into a ZIP:
3871

3972
```bash
40-
cd gateway
41-
./gradlew :app:bootJar
73+
cd subgraphs && zip -r ../subgraphs.zip . && cd ..
4274
```
4375

4476
Build the distribution ZIP:
@@ -48,7 +80,33 @@ cd gateway
4880
./gradlew :app:feddiGatewayDistZip
4981
```
5082

51-
The feddi Gateway application reads `feddi-gateway.yml` from the working directory and serves GraphQL requests at `POST /graphql`.
83+
Extract the distribution from the repository root:
84+
85+
```bash
86+
unzip gateway/app/build/distributions/feddi-gateway.zip
87+
```
88+
89+
Create `feddi-gateway/feddi-gateway.yml`:
90+
91+
```yaml
92+
port: 8080
93+
```
94+
95+
Start the gateway:
96+
97+
```bash
98+
cd feddi-gateway
99+
bin/feddi-gateway
100+
```
101+
102+
In a separate terminal, upload your subgraph definitions from the repository root:
103+
104+
```bash
105+
curl -X POST http://localhost:9091/admin/upload \
106+
-F file=@subgraphs.zip
107+
```
108+
109+
Your federated graph is now available at `POST http://localhost:8080/graphql`. Make sure the subgraph servers are running at the configured URLs before sending queries.
52110

53111
## Configuration
54112

@@ -62,8 +120,6 @@ If `feddi-gateway.yml` is missing or cannot be parsed, the feddi Gateway starts
62120

63121
### `feddi-gateway.yml`
64122

65-
The `extensions` section is optional. A standalone deployment can omit it entirely.
66-
67123
Example:
68124

69125
```yaml
@@ -82,11 +138,11 @@ Supported top-level keys:
82138
| `enable-introspection` | boolean | `true` | Whether GraphQL introspection is enabled. Set to `false` in production to prevent schema discovery |
83139
| `admin-port` | integer | `9091` | Port for the admin endpoint (`/admin/upload`) |
84140
| `admin-address` | string | `127.0.0.1` | Bind address for the admin server. Set to `0.0.0.0` if admin access is needed from outside the host (e.g. Docker) |
85-
| `management-port` | integer | `9090` | Port for the actuator endpoints (health, metrics, info) |
141+
| `management-port` | integer | `9090` | Port for the actuator endpoints; `GET /actuator/health` is the primary health check URL |
86142
| `management-address` | string | `127.0.0.1` | Bind address for the management server. Set to `0.0.0.0` if health checks come from outside the host (e.g. Docker, Kubernetes) |
87143
| `max-request-size-bytes` | long | `2097152` | Maximum GraphQL request body size in bytes; set to `0` to disable the limit |
88144
| `logging.dir` | string | `.` | Directory where rolling log files are written |
89-
| `extensions` | map | `{}` | Namespace-based configuration passed to installed extensions |
145+
| `extensions` | map | `{}` | Namespace-based configuration passed to installed extensions; omit entirely for a standalone deployment |
90146

91147
Logging behavior is fixed by the application:
92148

@@ -103,7 +159,7 @@ The feddi Gateway itself recognizes the namespace and forwards its configuration
103159

104160
### feddi Gateway Definition Uploads
105161

106-
The default runtime source accepts feddi Gateway definitions through `POST /admin/upload` as multipart form data with a `file` part containing a ZIP archive.
162+
The default runtime source accepts feddi Gateway definitions through `POST /admin/upload` as multipart form data with a `file` part containing a ZIP archive. Each upload replaces the active definition immediately.
107163

108164
If an extension-provided `FeddiGatewayDefinitionSource` is installed and active, ZIP uploads are disabled.
109165

@@ -162,6 +218,14 @@ The distribution launcher script supports these environment variables:
162218

163219
The launcher requires Java 25 or later.
164220

221+
## Repository Layout
222+
223+
- `gateway/engine` - Composition, validation, query planning, and execution
224+
- `gateway/app` - Spring Boot application that serves the feddi Gateway over HTTP
225+
- `gateway/extension-api` - Public extension API for integrating gateway behavior
226+
- `e2e-tests` - Docker-based end-to-end tests
227+
- `scripts` - Helper scripts for common local workflows
228+
165229
## Running Tests
166230

167231
Run everything in this repository:
@@ -185,7 +249,7 @@ cd gateway
185249
./gradlew :app:integrationTest
186250
```
187251

188-
If you run `e2e-tests` directly (without `./scripts/run-e2e-tests.sh`) after changing `feddi-gateway/extension-api`, publish the API to your local Maven repository first so the e2e-tests subproject can resolve it:
252+
If you run `e2e-tests` directly (without `./scripts/run-e2e-tests.sh`) after changing `gateway/extension-api`, publish the API to your local Maven repository first so the e2e-tests subproject can resolve it:
189253

190254
```bash
191255
cd gateway
@@ -223,3 +287,7 @@ See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
223287
## License
224288

225289
This project is licensed under the Apache License 2.0. See [LICENSE](LICENSE).
290+
291+
---
292+
293+
Built by Andi Marek, creator of GraphQL Java, and the feddi team.

0 commit comments

Comments
 (0)