#graphql #diesel #codegen #orm #graphql-schema

macro botanist_codegen

Code generation library for Botanist; Generate GraphQL schemas from Diesel models

1 unstable release

0.1.0 Apr 8, 2021

#54 in #graphql-schema

MIT license

43KB
908 lines

Botanist

An experimental Diesel backed GraphQL ORM layer for Juniper.

Botanist will generate a fully featured GraphQL schema from your existing Diesel models and a few bits of additional information you provided. Botanist enables the fast development of rich data models without the need to spend time writing explicit resolvers manually. Of course, writing additional resolvers manually is still supported should you require any more significant application logic.

Features

  • Schema generation from Diesel models
  • Bulk load/single load query generation
  • Simple HasOne / HasMany abstractions
  • HasMany Pagination
  • Supports runtime query modification per model (Useful for authorization)
  • Create/Update/Delete mutation generation
  • Batch model 'preloading' via Juniper LookAheadSelection's

Dependencies

~7MB
~173K SLoC