ash-project / ash_graphql

The extension for building GraphQL APIs with Ash
https://hexdocs.pm/ash_graphql
MIT License
71 stars 46 forks source link

Compilng with latest 1.17 RC throws warnings that cause failure to compile when compiling with warnings as errors #175

Closed allenwyma closed 3 months ago

allenwyma commented 3 months ago

Describe the bug Elixir 1.17 rc 1 is throwing warnings upon compiliation. When I compile with warnings as errors, I get an error.

To Reproduce Use 1.1.1 ash_graphql, setup the project, and use Elixir 1.17-rc.1 with otp 27 and use mix compile

Expected behavior Compile without throwing an error.

** Runtime

Additional context

warning: using map.field notation (without parentheses) to invoke function Ash.Query.Operator.IsNil.predicate?() is deprecated, you must add parentheses instead: remote.function()
  (ash_graphql 1.1.1) lib/resource/resource.ex:2267: anonymous fn/1 in AshGraphql.Resource.filter_type/3
  (elixir 1.17.0-rc.1) lib/enum.ex:4301: Enum.filter_list/2
  (ash_graphql 1.1.1) lib/resource/resource.ex:2267: AshGraphql.Resource.filter_type/3
  (elixir 1.17.0-rc.1) lib/enum.ex:4353: Enum.flat_map_list/2
  (ash_graphql 1.1.1) lib/resource/resource.ex:2217: AshGraphql.Resource.filter_field_types/2

I saw this was fixed in absinthe: https://github.com/absinthe-graphql/absinthe/pull/1318