Support loading ecto conditionally [Partial Solution] #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Including graphql_relay in projects which do not use ecto causes problems, because the ecto dependency here is only required for
:test
anddev
, and is not installed by Mix by default when including graphql_relay as a dependency. This means that the application won't boot, as it can't find:ecto
on launch.This PR solves the problem for environments other than
:test
and:dev
, but does not resolve the case where graphql_relay is used in the:test
environment of a project which does not use ecto. In that instance (as is the case with my own project) I'm currently forced to include ecto to satisfy the child dependency, even though my own project doesn't use it. I'm not sure how to resolve this — unless there's an elusiveMix.included_as_a_dependency
(etc.) method that I've missed, which would enable more precise control over app loading!