Skip to content

Commit 0d35f34

Browse files
committed
Fix typespecs
1 parent 8731b99 commit 0d35f34

6 files changed

Lines changed: 9 additions & 3 deletions

File tree

lib/swapi_web/graphql/resolvers/film_resolver.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ defmodule SWAPIWeb.GraphQL.Resolvers.FilmResolver do
44
"""
55

66
alias SWAPI.Films
7+
alias SWAPI.Schemas.Film
78

89
@spec all(map, map) :: {:ok, list(Film.t())} | {:error, any}
910
def all(_args, _info) do

lib/swapi_web/graphql/resolvers/person_resolver.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ defmodule SWAPIWeb.GraphQL.Resolvers.PersonResolver do
44
"""
55

66
alias SWAPI.People
7+
alias SWAPI.Schemas.Person
78

89
@spec all(map, map) :: {:ok, list(Person.t())} | {:error, any}
910
def all(_args, _info) do

lib/swapi_web/graphql/resolvers/planet_resolver.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ defmodule SWAPIWeb.GraphQL.Resolvers.PlanetResolver do
44
"""
55

66
alias SWAPI.Planets
7+
alias SWAPI.Schemas.Planet
78

89
@spec all(map, map) :: {:ok, list(Planet.t())} | {:error, any}
910
def all(_args, _info) do

lib/swapi_web/graphql/resolvers/species_resolver.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,22 @@ defmodule SWAPIWeb.GraphQL.Resolvers.SpeciesResolver do
44
"""
55

66
alias SWAPI.Species
7+
alias SWAPI.Schemas.Species, as: SpeciesSchema
78

8-
@spec all(map, map) :: {:ok, list(Species.t())} | {:error, any}
9+
@spec all(map, map) :: {:ok, list(SpeciesSchema.t())} | {:error, any}
910
def all(_args, _info) do
1011
{:ok, Species.list_species()}
1112
end
1213

13-
@spec one(map, Absinthe.Resolution.t()) :: {:ok, Species.t()} | {:error, any}
14+
@spec one(map, Absinthe.Resolution.t()) :: {:ok, SpeciesSchema.t()} | {:error, any}
1415
def one(%{id: id}, _info) do
1516
case Species.get_species(id) do
1617
{:ok, species} -> {:ok, species}
1718
{:error, :not_found} -> {:error, "Species not found"}
1819
end
1920
end
2021

21-
@spec search(map, Absinthe.Blueprint.t()) :: {:ok, list(Species.t())} | {:error, any}
22+
@spec search(map, Absinthe.Blueprint.t()) :: {:ok, list(SpeciesSchema.t())} | {:error, any}
2223
def search(%{search_terms: search_terms}, _info) do
2324
{:ok, Species.search_species(search_terms)}
2425
end

lib/swapi_web/graphql/resolvers/starship_resolver.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ defmodule SWAPIWeb.GraphQL.Resolvers.StarshipResolver do
33
Starship resolver.
44
"""
55

6+
alias SWAPI.Schemas.Starship
67
alias SWAPI.Starships
78

89
@spec all(map, map) :: {:ok, list(Starship.t())} | {:error, any}

lib/swapi_web/graphql/resolvers/vehicle_resolver.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ defmodule SWAPIWeb.GraphQL.Resolvers.VehicleResolver do
33
Vehicle resolver.
44
"""
55

6+
alias SWAPI.Schemas.Vehicle
67
alias SWAPI.Vehicles
78

89
@spec all(map, map) :: {:ok, list(Vehicle.t())} | {:error, any}

0 commit comments

Comments
 (0)