chore: apply credo suggestions (#3)
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Mainly add module docs and fix some aliases.
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
defmodule WabanexWeb.Resolvers.Training do
|
||||
@moduledoc """
|
||||
GraphQL resolver for training operations.
|
||||
"""
|
||||
alias Wabanex.Trainings
|
||||
|
||||
def create(%{input: params}, _context), do: Trainings.Create.call(params)
|
||||
|
@@ -1,4 +1,7 @@
|
||||
defmodule WabanexWeb.Resolvers.User do
|
||||
@moduledoc """
|
||||
GraphQL resolver for user operations.
|
||||
"""
|
||||
alias Wabanex.Users
|
||||
|
||||
def get(%{id: user_id}, _context), do: Users.Get.call(user_id)
|
||||
|
@@ -1,4 +1,7 @@
|
||||
defmodule WabanexWeb.Schema do
|
||||
@moduledoc """
|
||||
GraphQL schema definition
|
||||
"""
|
||||
use Absinthe.Schema
|
||||
|
||||
import_types WabanexWeb.Schema.Types.Root
|
||||
|
@@ -1,4 +1,7 @@
|
||||
defmodule WabanexWeb.Schema.Types.Custom.DateRange do
|
||||
@moduledoc """
|
||||
Graphql date range custom type.
|
||||
"""
|
||||
use Absinthe.Schema.Notation
|
||||
|
||||
alias Absinthe.Blueprint.Input
|
||||
|
@@ -1,4 +1,7 @@
|
||||
defmodule WabanexWeb.Schema.Types.Custom.UUID4 do
|
||||
@moduledoc """
|
||||
GraphQL uuid v4 custom type.
|
||||
"""
|
||||
use Absinthe.Schema.Notation
|
||||
|
||||
alias Ecto.UUID
|
||||
|
@@ -1,4 +1,7 @@
|
||||
defmodule WabanexWeb.Schema.Types.Exercise do
|
||||
@moduledoc """
|
||||
GraphQL exercise type definition.
|
||||
"""
|
||||
use Absinthe.Schema.Notation
|
||||
|
||||
@desc "Logic exercise representation"
|
||||
|
@@ -1,10 +1,13 @@
|
||||
defmodule WabanexWeb.Schema.Types.Root do
|
||||
@moduledoc """
|
||||
GraphQL root query/mutation aggregator.
|
||||
"""
|
||||
use Absinthe.Schema.Notation
|
||||
|
||||
alias Crudry.Middlewares.TranslateErrors
|
||||
|
||||
alias WabanexWeb.Resolvers.User, as: UserResolver
|
||||
alias WabanexWeb.Resolvers.Training, as: TrainingResolver
|
||||
alias WabanexWeb.Resolvers.User, as: UserResolver
|
||||
alias WabanexWeb.Schema.Types
|
||||
|
||||
import_types Types.Custom.UUID4
|
||||
|
@@ -1,4 +1,7 @@
|
||||
defmodule WabanexWeb.Schema.Types.Training do
|
||||
@moduledoc """
|
||||
GraphQL training type definition.
|
||||
"""
|
||||
use Absinthe.Schema.Notation
|
||||
|
||||
import_types WabanexWeb.Schema.Types.Custom.DateRange
|
||||
|
@@ -1,4 +1,7 @@
|
||||
defmodule WabanexWeb.Schema.Types.User do
|
||||
@moduledoc """
|
||||
GraphQL user type definition.
|
||||
"""
|
||||
use Absinthe.Schema.Notation
|
||||
|
||||
@desc "Logic user representation"
|
||||
|
@@ -1,4 +1,7 @@
|
||||
defmodule WabanexWeb.Telemetry do
|
||||
@moduledoc """
|
||||
Telemetry implementation
|
||||
"""
|
||||
use Supervisor
|
||||
import Telemetry.Metrics
|
||||
|
||||
|
Reference in New Issue
Block a user