Speakeasy v0.1.0 Speakeasy

Authorize Absinthe queries and mutations.

Please see the README.

Link to this section Summary

Functions

Macro form of resolve/2. This will cause your application to fail to compile if your resolution function isn’t compatible with what Speakeasy

If authorized returns an anonymous function that encapsulates your GraphQL resolution function. Otherwise returns the Bodyguard error response

Link to this section Functions

Link to this macro resolve!(mod, fun) (macro)

Macro form of resolve/2. This will cause your application to fail to compile if your resolution function isn’t compatible with what Speakeasy

Examples

iex> Speakeasy.resolve(MyApp.Posts, :create_post)
Link to this function resolve(mod, fun)

If authorized returns an anonymous function that encapsulates your GraphQL resolution function. Otherwise returns the Bodyguard error response.

Examples

iex> Speakeasy.resolve(MyApp.Posts, :create_post)