Last active
July 3, 2020 15:31
-
-
Save jinjagit/4335237fe61cd06efb6f6219046edaff to your computer and use it in GitHub Desktop.
adds aliases to iex shell for liquidvoting API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# adds aliases and imports a / some module(s) to iex shell for liquidvoiting API | |
# rename to .iex.exs and place in API project root | |
# for dev environment, not production - add to / don't remove from your local gitignore | |
# <alias ... as> used to avoid referencing other module with name equivalent to alias | |
import Ecto.Query | |
alias LiquidVoting.Application, as: App | |
alias LiquidVoting.{ | |
Delegations, | |
Metrics, | |
Release, | |
Repo, | |
Voting, | |
VotingResults, | |
VotingWeight | |
} | |
alias LiquidVoting.Delegations.Delegation | |
alias LiquidVoting.Voting.{Participant, Vote} | |
alias LiquidVoting.VotingResults.Result | |
alias LiquidVotingWeb.{ | |
Endpoint, | |
ErrorHelpers, # API/lib/liquid_voting_web/views/ | |
ErrorView, # API/lib/liquid_voting_web/views/ | |
Router, | |
UserSocket # API/lib/liquid_voting_web/channels/ | |
} | |
# LiquidVotingWeb.Gettext not aliased | |
alias LiquidVotingWeb.Plugs.Context | |
alias LiquidVotingWeb.Resolvers.Delegations, as: DelegationsResolver | |
alias LiquidVotingWeb.Resolvers.Voting, as: VotingResolver | |
alias LiquidVotingWeb.Resolvers.VotingResults, as: VotingResultsResolver | |
alias LiquidVotingWeb.Schema.{ChangesetErrors, Schema} | |
# no aliases defined for tests |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice 👍 How about
DelegationsResolver
instead ofResolversDelegations
? Same for the other Resolvers* aliases