Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maartenvanvliet/absinthe_sdl
Convert Absinthe Schemas to SDL syntax
https://github.com/maartenvanvliet/absinthe_sdl
Last synced: 28 days ago
JSON representation
Convert Absinthe Schemas to SDL syntax
- Host: GitHub
- URL: https://github.com/maartenvanvliet/absinthe_sdl
- Owner: maartenvanvliet
- License: mit
- Created: 2019-01-02T19:23:27.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-21T08:16:38.000Z (almost 3 years ago)
- Last Synced: 2024-04-24T01:02:16.866Z (8 months ago)
- Language: Elixir
- Homepage: https://hex.pm/packages/absinthe_sdl
- Size: 44.9 KB
- Stars: 7
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> #### Important! {: .neutral}
>
> Absinthe 1.5 and up contains a feature to generate SDL from an Absinthe schema. This is a better approach than what this repository does. See https://hexdocs.pm/absinthe/Mix.Tasks.Absinthe.Schema.Sdl.html for more information.# AbsintheSdl
[![Build Status](https://travis-ci.com/maartenvanvliet/absinthe_sdl.svg?branch=master)](https://travis-ci.com/maartenvanvliet/absinthe_sdl) [![Hex pm](http://img.shields.io/hexpm/v/absinthe_sdl.svg?style=flat)](https://hex.pm/packages/absinthe_sdl) [![Hex Docs](https://img.shields.io/badge/hex-docs-9768d1.svg)](https://hexdocs.pm/absinthe_sdl) [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
Convert the json output of an introspection query into Graphql SDL syntax.
## Standalone
Can convert the output of introspection queries in json format to SDL. See the test fixtures.
### Example
```
AbsintheSdl.encode!(Jason.decode!("swapi.json"))
```## Absinthe
Can be used to convert an Absinthe schema to SDL by using AbsintheSdl as the JSON
encoder.### Example
```
mix absinthe.schema.json --schema MySchema --json-codec AbsintheSdl
```## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `absinthe_sdl` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:absinthe_sdl, "~> 1.0.0"}
]
end
```Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/absinthe_sdl](https://hexdocs.pm/absinthe_sdl).