Closed Awlexus closed 3 years ago
This isn't really possible for us to support as written. Your best bet is to do:
if Mix.env() == :test do
enum :social_media do
value :google
value :facebook
value :twitter
value :linkedin
value :mock
end
else
enum :social_media do
value :google
value :facebook
value :twitter
value :linkedin
end
end
Or you can use a pipeline modifier: https://hexdocs.pm/absinthe/Absinthe.Schema.html#module-custom-schema-manipulation-in-progress
Interestingly, I tried wrapping the whole definition as well and got an error because the enum was defined multiple times 😅
But understandable, I will look into pipelines, thanks for the suggestion
Environment
Elixir 1.12.2 (compiled with Erlang/OTP 22)