GreenFairy Logo

GreenFairy

Hex.pmDocumentationCI

A cleaner DSL for GraphQL schema definitions built on Absinthe.


⚠️ Experimental: GreenFairy is in early development. The API may change between versions.

Features

Installation

def deps do
  [{:green_fairy, "~> 0.1.0"}]
end

Quick Example

defmodule MyApp.GraphQL.Types.User do
  use GreenFairy.Type

  type "User", struct: MyApp.User do
    field :id, non_null(:id)
    field :name, :string
    field :email, non_null(:string)

    connection :posts, MyApp.GraphQL.Types.Post
  end
end
query {
  users(where: { email: { _ilike: "%@example.com" } }, first: 10) {
    nodes { id name email }
    pageInfo { hasNextPage endCursor }
  }
}

Documentation

Links

License

MIT — see LICENSE

Contributing

See CONTRIBUTING.md for guidelines.