View Source README
Important!
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
Convert the json output of an introspection query into Graphql SDL syntax.
standalone
Standalone
Can convert the output of introspection queries in json format to SDL. See the test fixtures.
example
Example
AbsintheSdl.encode!(Jason.decode!("swapi.json"))
absinthe
Absinthe
Can be used to convert an Absinthe schema to SDL by using AbsintheSdl as the JSON encoder.
example-1
Example
mix absinthe.schema.json --schema MySchema --json-codec AbsintheSdl
installation
Installation
If available in Hex, the package can be installed
by adding absinthe_sdl to your list of dependencies in mix.exs:
def deps do
[
{:absinthe_sdl, "~> 1.0.0"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/absinthe_sdl.