If https://graphql.org/ and https://github.com/trpc/trpc?target=https://github.com had a baby.
TL;DR; (too long; didn't write):
- Create a special TypeScript file to define your Graph (similar to a GraphQL schema)
- Write some resolvers to handle the incoming requests
- In the client use the types from
1.to get a type safe query builder
- Same advantages as GraphQL: fetch only what you need, query validation, etc.
- Type-safe client without any build step
- Very thin client library
Look at the examples folder for some examples of what is possible. You can
also look at the test folder to see what is supported.