From 12d70a98478d44025504f600be877f4d08d5f72b Mon Sep 17 00:00:00 2001 From: vtm9 Date: Thu, 11 Jan 2024 10:37:13 +0100 Subject: [PATCH 1/2] Fix Logger warnings --- README.md | 4 ++-- lib/absinthe/relay/connection.ex | 2 +- lib/absinthe/relay/node.ex | 4 ++-- mix.exs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a679220..f664005 100644 --- a/README.md +++ b/README.md @@ -18,12 +18,12 @@ Install from [Hex.pm](https://hex.pm/packages/absinthe_relay): ```elixir def deps do [ - {:absinthe_relay, "~> 1.5.0"} + {:absinthe_relay, "~> 1.6.0"} ] end ``` -Note: Absinthe.Relay requires Elixir 1.10 or higher. +Note: Absinthe.Relay requires Elixir 1.11 or higher. ## Upgrading diff --git a/lib/absinthe/relay/connection.ex b/lib/absinthe/relay/connection.ex index 13f78e0..32db3bb 100644 --- a/lib/absinthe/relay/connection.ex +++ b/lib/absinthe/relay/connection.ex @@ -587,7 +587,7 @@ defmodule Absinthe.Relay.Connection do args |> Enum.flat_map(fn {key, _} when key in [:node] -> - Logger.warn("Ignoring additional #{key} provided on edge (overriding is not allowed)") + Logger.warning("Ignoring additional #{key} provided on edge (overriding is not allowed)") [] {key, val} -> diff --git a/lib/absinthe/relay/node.ex b/lib/absinthe/relay/node.ex index d609d09..d43856c 100644 --- a/lib/absinthe/relay/node.ex +++ b/lib/absinthe/relay/node.ex @@ -264,7 +264,7 @@ defmodule Absinthe.Relay.Node do global_id {:error, err} -> - Logger.warn( + Logger.warning( "Failed to translate (#{inspect(node_type)}, #{inspect(source_id)}) to global ID with error: #{err}" ) @@ -371,7 +371,7 @@ defmodule Absinthe.Relay.Node do # Reports a failure to fetch an ID @spec report_fetch_id_error(type_name :: String.t(), source :: any) :: {:error, String.t()} defp report_fetch_id_error(type_name, source) do - Logger.warn(@missing_internal_id_error <> " (type #{type_name})") + Logger.warning(@missing_internal_id_error <> " (type #{type_name})") Logger.debug(inspect(source)) {:error, @missing_internal_id_error} end diff --git a/mix.exs b/mix.exs index 8df265a..78bb155 100644 --- a/mix.exs +++ b/mix.exs @@ -2,7 +2,7 @@ defmodule AbsintheRelay.Mixfile do use Mix.Project @source_url "https://github.com/absinthe-graphql/absinthe_relay" - @version "1.5.2" + @version "1.6.0" def project do [ From f66e110da099877244fc2bfc45cba4ee7a29cf84 Mon Sep 17 00:00:00 2001 From: vtm9 Date: Thu, 11 Jan 2024 23:03:42 +0100 Subject: [PATCH 2/2] Fix versions --- README.md | 2 +- mix.exs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f664005..b2f69f4 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Install from [Hex.pm](https://hex.pm/packages/absinthe_relay): ```elixir def deps do [ - {:absinthe_relay, "~> 1.6.0"} + {:absinthe_relay, "~> 1.5.0"} ] end ``` diff --git a/mix.exs b/mix.exs index 78bb155..7eeb3b0 100644 --- a/mix.exs +++ b/mix.exs @@ -2,7 +2,7 @@ defmodule AbsintheRelay.Mixfile do use Mix.Project @source_url "https://github.com/absinthe-graphql/absinthe_relay" - @version "1.6.0" + @version "1.5.3" def project do [