Documentation

Everything you need to know about GraphLink — from first schema to production deployment.

Philosophy
Why pure code generation? Why no runtime abstractions? Why only what the server needs?
Read →
Getting Started
Install the CLI, write your first schema, run the generator. Zero to generated code in 5 minutes.
Read →
Dart / Flutter Client
Typed queries, mutations, and subscriptions. Adapter pattern — bring your own HTTP client.
Read →
Java Client
No generics. No casting. Jackson or any JSON library. Builder pattern on all inputs.
Read →
Spring Boot
Generated controllers, service interfaces, types, inputs, and enums. Just implement the service.
Read →
Caching
@glCache and @glCacheInvalidate directives. Tag-based invalidation. Partial query caching.
Read →

The schema used throughout these docs

All examples in this documentation use the following schema. It covers every major GraphLink feature: types, enums, inputs, queries, mutations, subscriptions, and cache directives.

schema.graphql GraphQL
enum FuelType {
  GASOLINE
  DIESEL
  ELECTRIC
  HYBRID
}

type Person {
  id: ID!
  name: String!
  email: String!
  vehicles: [Vehicle!]!
}

type Vehicle {
  id: ID!
  brand: String!
  model: String!
  year: Int!
  fuelType: FuelType!
  ownerId: ID
}

input AddPersonInput {
  name: String!
  email: String!
}

input AddVehicleInput {
  brand: String!
  model: String!
  year: Int!
  fuelType: FuelType!
  ownerId: ID
}

type Query {
  getPerson(id: ID!): Person
  getVehicle(id: ID!): Vehicle!  @glCache(ttl: 120, tags: ["vehicles"])
  listVehicles: [Vehicle!]!      @glCache(ttl: 60,  tags: ["vehicles"])
}

type Mutation {
  addPerson(input: AddPersonInput!): Person!
  addVehicle(input: AddVehicleInput!): Vehicle! @glCacheInvalidate(tags: ["vehicles"])
}

type Subscription {
  vehicleAdded: Vehicle!
}

What this schema exercises
FuelType is an enum — GraphLink generates serialization in both directions. Person and Vehicle are types with nullable/non-nullable fields. AddPersonInput and AddVehicleInput are input types. getVehicle and listVehicles use @glCache with tags. addVehicle uses @glCacheInvalidate — when it runs, all entries tagged "vehicles" are evicted. vehicleAdded is a subscription backed by a WebSocket connection.