GraphQLMinify (graphql_minify v0.1.1)

Minify graphql

Summary

Functions

minifies graphql

minifies graphql but raises on exception

Functions

@spec minify(binary()) :: {:ok, binary()} | {:error, GraphQLMinify.Exception.t()}

minifies graphql

iex> GraphQLMinify.minify("{     results             }")
{:ok, "{results}"}

iex> GraphQLMinify.minify("${}")
{:error, %GraphQLMinify.Exception{message: "unknown token"}}
@spec minify!(binary()) :: binary()

minifies graphql but raises on exception

iex> GraphQLMinify.minify!("{     results             }")
"{results}"