Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absinthe.Relay.Connection.from_query may have wrong type #133

Open
thezjy opened this issue Jan 6, 2019 · 0 comments
Open

Absinthe.Relay.Connection.from_query may have wrong type #133

thezjy opened this issue Jan 6, 2019 · 0 comments

Comments

@thezjy
Copy link

thezjy commented Jan 6, 2019

Code:

def list_course(_parent, args, _resolution) do
  Absinthe.Relay.Connection.from_query(
    Courses.Course,
    &Composure.Repo.all/1,
    args,
    max: 5
  )
end

After I add the max option, the code works correctly, but dialyzer gives a warning:

The call 'Elixir.Absinthe.Relay.Connection':from_query('Elixir.Composure.Courses.Course',fun(() -> any()),args@1::any(),[{'max',5},...]) will never return since the success typing is (any(),any(),#{'after':='nil' | integer(), 'before':='nil' | integer(), 'first':='nil' | integer(), 'last':='nil' | integer()},[{'count',non_neg_integer()} | {'has_next_page',boolean()} | {'has_previous_page',boolean()}]) -> {'error',<<:64,:_*8>>} | {'ok',#{'edges':=[map()], 'page_info':=#{'end_cursor':=binary(), 'has_next_page':=boolean(), 'has_previous_page':=boolean(), 'start_cursor':=binary()}}} and the contract is ('Elixir.Ecto.Queryable':t(),fun(('Elixir.Ecto.Queryable':t()) -> [term()]),'Elixir.Absinthe.Relay.Connection.Options':t(),from_query_opts()) -> {'ok',map()} | {'error',any()}

Maybe the type is wrong?

johnnoone added a commit to johnnoone/absinthe_relay that referenced this issue Aug 23, 2019
The `max` keyword was missing.
It will fix dialer errors as described in absinthe-graphql#133.
benwilson512 pushed a commit that referenced this issue Aug 23, 2019
The `max` keyword was missing.
It will fix dialer errors as described in #133.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant