Skip to content

REST

Start With the REST API You Have: A Typed Client Today, GraphQL Later

Most teams that want GraphQL already have a REST API. They cannot switch in a weekend, and they should not have to. So the realistic plan is: keep calling REST, and move to GraphQL as the server catches up. GraphLink 6.0 is built for that plan.

TL;DR

  • Describe a REST endpoint in a schema file, run glink, and get a typed client in Dart, Java, TypeScript, Kotlin, Swift, Python or Go.
  • Cache REST calls on the client with @glCache, using the same store and tags as GraphQL.
  • Migrate a field to GraphQL by removing one directive. The call site does not change.