Define your GraphQL schema once. Get a fully typed client and server scaffold — for Dart, Flutter, Java, TypeScript, Kotlin, and Spring Boot — in milliseconds.
GraphLink (glink) reads .graphql schema files and generates production-ready, idiomatic code for your target language. Generated files have zero runtime dependency on GraphLink — delete the tool tomorrow, everything still compiles.
This image ships glink as a single static binary on a scratch base: no OS, no shell, no dependencies. Multi-arch: linux/amd64 and linux/arm64.
GetVehicleResponse res = client.queries.getVehicle("42");, fully resolved, no TypeReference or Map<String,Object> casting.@glCache / @glCacheInvalidate directives drive TTL, tag-based invalidation, partial-query caching, and offline fallback in the generated client.@glCaptureErrors returns a FullResponse with data + errors side by side, no try/catch.glink auto-discovers glink.json / glink.yaml / glink.yml in the working directory:
docker run --rm -v "$(pwd)":/workspace -w /workspace oualitsen/graphlink
| Flag | Description |
|---|---|
-c, --config <path> | Explicit path to config file (.json, .yaml, .yml) |
-w, --watch | Watch schema files and regenerate on every save |
-v, --version | Print the glink version |
-h, --help | Show usage |
docker run --rm -v "$(pwd)":/workspace -w /workspace oualitsen/graphlink -c config.json
docker run --rm -v "$(pwd)":/workspace -w /workspace oualitsen/graphlink -w
# schema/vehicle.graphql
type Vehicle {
id: ID!
brand: String!
model: String!
fuelType: FuelType!
}
enum FuelType { GASOLINE DIESEL ELECTRIC HYBRID }
type Query {
getVehicle(id: ID!): Vehicle! @glCache(ttl: "2m", tags: ["vehicles"])
}
// glink.json
{
"schemaPaths": ["schema/*.graphql"],
"mode": "client",
"typeMappings": { "ID": "String", "Float": "double", "Int": "int", "Boolean": "bool" },
"outputDir": "lib/generated",
"clientConfig": { "dart": { "packageName": "my_app" } }
}
docker run --rm -v "$(pwd)":/workspace -w /workspace oualitsen/graphlink
Generated code appears under outputDir on the host — the container just writes into the bind-mounted working directory.
Set "mode": "server" (with serverConfig) to instead emit a Spring Boot or Express/Apollo server: controllers/resolvers, service interfaces, types, inputs, and enums — implement the interface, the routing is already wired.
| Target | Status |
|---|---|
| Dart client | Stable |
| Flutter client (UI widget generation) | Stable |
| Java client | Stable |
| Kotlin client | Stable |
| TypeScript client | Stable |
| Spring Boot server | Stable |
| Express / Apollo (Node.js) server | Stable |
latest — most recent release<version> (e.g. 1.4.0) — pinned release, matches GitHub tag v1.4.0Content type
Image
Digest
sha256:3ee03b987…
Size
3.9 MB
Last updated
7 days ago
docker pull oualitsen/graphlink