Absinthe Relay with Ecto 3

Hello everyone,

I am trying to update a Graphql application to Ecto 3.

Unfortunately, it seems Absinthe Relay depends on Ecto 2,

When adding

{:absinthe_relay, “~> 1.4”},

I have this error message

...
Failed to use "db_connection" because
  ecto (versions 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 2.2.9, 2.2.10, 2.2.11) requires ~> 1.1
  ecto_sql (versions 3.0.0 to 3.0.3) requires ~> 2.0

** (Mix) Hex dependency resolution failed, change the version requirements of your dependencies or unlock them (by using mix deps.update or mix deps.unlock). If you are unable to resolve the conflicts you can try overriding with {:dependency, "~> 1.0", override: true}

Does anybody have success with using Absinthe Relay with Ecto 3?

Going to hex.pm, I could see Absinthe Relay depends on…

  • ecto ~> 2.0 (optional)

Thanks for taking time

To force Absinthe Relay to use Ecto 3, I did add this line to my mix file…

{:ecto, “~> 3.0”, override: true},

This solve the issue for the moment.

Have a good weekend.

3 Likes

Yeah that looks like it’ll be fine (as long as none of your other dependencies actually depend on Ecto 2.x). There is also a merged PR to absinthe_relay but it hasn’t been released yet: https://github.com/absinthe-graphql/absinthe_relay/pull/125

2 Likes