Skip to content

Commit f13a251

Browse files
authored
Merge pull request #32 from cgiffard/patch/cgiffard-load-ecto-conditionally
Support loading ecto conditionally [Partial Solution]
2 parents 6fd5662 + 4b339ba commit f13a251

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mix.exs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ defmodule GraphQL.Relay.Mixfile do
2222

2323
def application do
2424
[
25-
applications: [:logger, :ecto],
25+
applications: applications(Mix.env),
2626
env: [
2727
schema_module: StarWars.Schema, # Module with a .schema function that returns your GraphQL schema
2828
schema_json_path: "./schema.json"
2929
]
3030
]
3131
end
32+
33+
defp applications(:test), do: applications(:prod) ++ [:ecto]
34+
defp applications(:dev), do: applications(:prod) ++ [:ecto]
35+
defp applications(_), do: [:logger]
3236

3337
defp deps do
3438
[

0 commit comments

Comments
 (0)