# Craft GraphQL APIs in Elixir with Absinthe: trigger uses incorrect arity (page 118)

**URL:** <https://forum.devtalk.com/t/craft-graphql-apis-in-elixir-with-absinthe-trigger-uses-incorrect-arity-page-118/29004>\
**Category:** PragProg Customers\
**Tags:** book-craft-graphql-apis-in-elixir-with-absinthe, errata\
**Created:** [13 November 2021 01:29 UTC](https://forum.devtalk.com/t/craft-graphql-apis-in-elixir-with-absinthe-trigger-uses-incorrect-arity-page-118/29004 "2021-11-13T01:29:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilya](https://forum.devtalk.com/user_avatar/forum.devtalk.com/ilya/32/3585_2.png) [@ilya](https://forum.devtalk.com/u/ilya)\
**Post date:** [13 November 2021 01:29 UTC](https://forum.devtalk.com/t/craft-graphql-apis-in-elixir-with-absinthe-trigger-uses-incorrect-arity-page-118/29004/1 "2021-11-13T01:29:30Z")

</div>

Page 118 contains the following trigger code:

```auto
trigger :ready_order, topic:
  fn %{ ready: order}, _ -> [order.id]
  _, _ -> []
end

```

The trigger function in the latest version of absinthe is 1-arity, using 2-arity will cause it to blow up with a cryptic error. The correct code is:

```auto
trigger :ready_order, topic:
  fn %{ ready: order} -> [order.id]
  _ -> []
end

```
