Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sashman/absinthe_gen
Scaffold generator for elixir phoenix absinthe projects
https://github.com/sashman/absinthe_gen
absinthe absinthe-graphql elixir elixir-phoenix gen generator graphql phoenix scaffold-generator
Last synced: 2 months ago
JSON representation
Scaffold generator for elixir phoenix absinthe projects
- Host: GitHub
- URL: https://github.com/sashman/absinthe_gen
- Owner: sashman
- License: mit
- Created: 2019-07-27T20:26:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-25T14:58:17.000Z (about 4 years ago)
- Last Synced: 2024-09-30T09:02:05.492Z (2 months ago)
- Topics: absinthe, absinthe-graphql, elixir, elixir-phoenix, gen, generator, graphql, phoenix, scaffold-generator
- Language: Elixir
- Homepage:
- Size: 1.78 MB
- Stars: 28
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-elixir - absinthe_gen - Scaffold generator for Absithne. (Domain-specific language)
- awesome-elixir - absinthe_gen - Scaffold generator for Absithne. (Domain-specific language)
README
# AbsintheGen
Scaffold generator for Elixir [Absinthe](https://hexdocs.pm/absinthe/overview.html) projects.
**I'm currently looking for ideas and suggestions, please feel to create an issue with features you'd like added or add ideas [here](https://github.com/sashman/absinthe_gen/issues/3)!**
## Installation
Available on [hex.pm](https://hex.pm/packages/absinthe_gen). The package can be installed by adding `absinthe_gen` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:absinthe_gen, "~> 0.2"}
]
end
```The docs can be found at [https://hexdocs.pm/absinthe_gen](https://hexdocs.pm/absinthe_gen).
## Usage
The scaffold task will generate a schema, a type and a resolver files based on ["Our First Query" tutorial](https://hexdocs.pm/absinthe/our-first-query.html). You can pass in multiple fields, the field types can be found [here](https://hexdocs.pm/absinthe/Absinthe.Type.Scalar.html#module-built-in-scalars).
```
mix absinthe.gen.scaffold my_context my_type my_field:string my_other_field:stringCreated:
lib/absinthe_app_web/schema/my_context_types.ex
lib/absinthe_app_web/schema.ex
lib/absinthe_app_web/resolvers/my_type.ex
```Available options:
- `--path PATH` - specify a subdirectory of `absinthe_app_web` where to create the files.