It has an abstract model of data sources implemented in terms of declarative mappings between GraphQL schemas and backing data, and cursors into that data. It supports in-memory, DB-backed, and effectful data sources.
Grackle is structured as a compiler/interpreter. Queries are type-checked against a GraphQL schema and compiled into an internal query algebra. The query algebra may be further compiled in a backend-specific way to materialize data. In particular it can be compiled to efficient SQL and in that regard currently supports Postgres via Doobie or Skunk.
- See the tutorial and accompanying demo.
- Online Scaladoc is available here.
- Ask us anything the in #grackle channel on the Typelevel discord server.
To add Grackle to your project you should add the following to your
// Required: Scala 2.13/3.3+ libraryDependencies += "org.typelevel" %% "grackle-core" % "0.17.0" // Optional: support for in-memory Json backend using circe libraryDependencies += "org.typelevel" %% "grackle-circe" % "0.17.0" // Optional: support for in-memory generic Scala backend using shapeless libraryDependencies += "org.typelevel" %% "grackle-generic" % "0.17.0" // Optional: support for Postgres backend via Doobie (JVM only) libraryDependencies += "org.typelevel" %% "grackle-doobie-pg" % "0.17.0" // Optional: support for Postgres backend via Skunk libraryDependencies += "org.typelevel" %% "grackle-skunk" % "0.17.0"
Grackle is proud to be a Typelevel project. We are committed to providing a friendly, safe and welcoming environment for all, and ask that the community adhere to the Scala Code of Conduct in all venues.
The Typelevel discord has a #grackle channel, as well as channels for related projects such as #cats, #cats-effect, #fs2, #doobie and #skunk. If you're new to the Typelevel ecosystem the #beginners channel might also be useful. Please join us!
This project exists thanks to all the people who contribute.
We welcome all kinds of contribution, including but not limited to,
- documentation improvements, explanatory images/diagrams, fixes in typos, useful links
- refactorings of messy code, build structure, increasing test coverage or quality
- new features and bugfixes (including bug reports and feature requests).
Writing documentation is valuable for learning, so if you find some explanation insufficient, overly complicated or incorrect, it's a perfect opportunity to make a change to it!
If at any point you run into problems, you can always ask a question on the #grackle channel on the Typelevel discord server.
More information, including on how to build locally and submit pull requests, can be found here.