Skip to content

Commit

Permalink
Merge branch 'master' of github.com:absinthe-graphql/absinthe_relay
Browse files Browse the repository at this point in the history
  • Loading branch information
benwilson512 committed Dec 18, 2018
2 parents 5600e4d + dbdd037 commit c3c85ca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
language: elixir
elixir: 1.4
elixir: 1.5
notifications:
recipients:
- [email protected]
- [email protected]
otp_release:
- 19.2
- 20.3
script: "MIX_ENV=test mix local.hex --force && MIX_ENV=test mix do deps.get, test"
5 changes: 5 additions & 0 deletions lib/absinthe/relay/connection/notation.ex
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ defmodule Absinthe.Relay.Connection.Notation do
do_connection_definition(naming, attrs, block)
end

defmacro connection(identifier, attrs) do
naming = naming_from_attrs!(attrs |> Keyword.put(:connection, identifier))
do_connection_definition(naming, attrs, [])
end

defmacro connection(attrs) do
naming = naming_from_attrs!(attrs)
do_connection_definition(naming, attrs, [])
Expand Down
2 changes: 2 additions & 0 deletions test/lib/absinthe/relay/connection_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ defmodule Absinthe.Relay.ConnectionTest do
end
end

connection(:favorite_pets_bare, node_type: :pet)

connection :favorite_pets, node_type: :pet do
field :fav_twice_edges_count, :integer do
resolve fn _, %{source: conn} ->
Expand Down

0 comments on commit c3c85ca

Please sign in to comment.