Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elixir 1.18.4-otp-27
erlang 27.3.4
elixir 1.18.4-otp-28
erlang 28.0.1
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# - Ex: hexpm/elixir:1.15.4-erlang-26.0.2-debian-bullseye-20230612-slim
#
ARG ELIXIR_VERSION=1.18.4
ARG OTP_VERSION=27.3.4
ARG DEBIAN_VERSION=bullseye-20250520-slim
ARG OTP_VERSION=28.0.1
ARG DEBIAN_VERSION=bullseye-20250610-slim

ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}"
ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}"
Expand All @@ -27,13 +27,13 @@

# labels from https://github.com/opencontainers/image-spec/blob/master/annotations.md
LABEL org.opencontainers.image.authors=conradwt@gmail.com
LABEL org.opencontainers.image.created=$CREATED_DATE

Check warning on line 30 in Dockerfile

View workflow job for this annotation

GitHub Actions / Call Docker Build / Build+Push

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$CREATED_DATE' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
LABEL org.opencontainers.image.revision=$SOURCE_COMMIT

Check warning on line 31 in Dockerfile

View workflow job for this annotation

GitHub Actions / Call Docker Build / Build+Push

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$SOURCE_COMMIT' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
LABEL org.opencontainers.image.title="Zero to GraphQL Using Elixir"
LABEL org.opencontainers.image.url=https://hub.docker.com/u/conradwt/zero-to-graphql-using-elixir
LABEL org.opencontainers.image.source=https://github.com/conradwt/zero-to-graphql-using-elixir
LABEL org.opencontainers.image.licenses=MIT
LABEL com.conradtaylor.elixir_version=$ELIXIR_VERSION

Check warning on line 36 in Dockerfile

View workflow job for this annotation

GitHub Actions / Call Docker Build / Build+Push

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$ELIXIR_VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

# install build dependencies
RUN apt-get update -y && apt-get install -y build-essential git \
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ The purpose of this example is to provide details as to how one would go about u

- Elixir 1.18.4 or newer

- Erlang 27.3.2 or newer
- Erlang 28.0.1 or newer

- Phoenix 1.7.20 or newer
- Phoenix 1.7.21 or newer

- PostgreSQL 17.2 or newer
- PostgreSQL 17.5 or newer

Note: This tutorial was updated on macOS 15.3.1.
Note: This tutorial was updated on macOS 15.5.

## Communication

Expand Down Expand Up @@ -398,8 +398,8 @@ Note: This tutorial was updated on macOS 15.3.1.
{:gettext, "~> 0.22.3"},
{:jason, "~> 1.4.4"},
{:bandit, "~> 1.3.0"},
{:absinthe, "~> 1.7.9"},
{:absinthe_plug, "~> 1.5.8"},
{:absinthe, "~> 1.7.10"},
{:absinthe_plug, "~> 1.5.9"},
{:cors_plug, "~> 3.0.3"}
]
end
Expand Down
10 changes: 0 additions & 10 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@ config :logger, :console,
# Use Jason for JSON parsing in Phoenix
config :phoenix, :json_library, Jason

# Configures mix_test_watch
if Mix.env() == :dev do
config :mix_test_watch,
clear: true,
tasks: [
"test",
"credo"
]
end

# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{config_env()}.exs"
3 changes: 1 addition & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@ defmodule ZeroPhoenix.Mixfile do
{:gettext, "~> 0.22.3"},
{:jason, "~> 1.4.4"},
{:bandit, "~> 1.3.0"},
{:absinthe, "~> 1.7.9"},
{:absinthe, "~> 1.7.10"},
{:absinthe_plug, "~> 1.5.9"},
{:cors_plug, "~> 3.0.3"},
{:credo, "~> 1.7.11", only: [:dev, :test], runtime: false},
{:mix_test_watch, "~> 1.1.2", only: [:dev, :test], runtime: false},
{:ecto_psql_extras, "~> 0.7.15"}
]
end
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%{
"absinthe": {:hex, :absinthe, "1.7.9", "85c5bc9dfcb984fadf632d6e9a9f6daa7770c68d4f751f20cd5f9e77c57be4a1", [:mix], [{:dataloader, "~> 1.0.0 or ~> 2.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:opentelemetry_process_propagator, "~> 0.2.1 or ~> 0.3", [hex: :opentelemetry_process_propagator, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "08ae6339b05252b98e859ccd76614c94325c991f85aa325edde30027b7b044fc"},
"absinthe": {:hex, :absinthe, "1.7.10", "b33471b593260f148d05e4d771d1857e07b70a680f89cfa75184098bef4ec893", [:mix], [{:dataloader, "~> 1.0.0 or ~> 2.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:opentelemetry_process_propagator, "~> 0.2.1 or ~> 0.3", [hex: :opentelemetry_process_propagator, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ffda95735364c041a65a4b0e02ffb04eabb1e52ab664fa7eeecefb341449e8c2"},
"absinthe_phoenix": {:hex, :absinthe_phoenix, "2.0.2", "e607b438db900049b9b3760f8ecd0591017a46122fffed7057bf6989020992b5", [:mix], [{:absinthe, "~> 1.5", [hex: :absinthe, repo: "hexpm", optional: false]}, {:absinthe_plug, "~> 1.5", [hex: :absinthe_plug, repo: "hexpm", optional: false]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.5", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.13 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}], "hexpm", "d36918925c380dc7d2ed7d039c9a3b4182ec36723f7417a68745ade5aab22f8d"},
"absinthe_plug": {:hex, :absinthe_plug, "1.5.9", "4f66fd46aecf969b349dd94853e6132db6d832ae6a4b951312b6926ad4ee7ca3", [:mix], [{:absinthe, "~> 1.7", [hex: :absinthe, repo: "hexpm", optional: false]}, {:plug, "~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "dcdc84334b0e9e2cd439bd2653678a822623f212c71088edf0a4a7d03f1fa225"},
"bandit": {:hex, :bandit, "1.3.0", "6a4e8d7c9ea721edd02c389e2cc867890cd96f83116e71ddf1ccbdd80661550c", [:mix], [{:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:thousand_island, "~> 1.0", [hex: :thousand_island, repo: "hexpm", optional: false]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "bda37d6c614d74778a5dc43b8bcdc3245cd30619eab0342f58042f968f2165da"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ defmodule ZeroPhoenixWeb.GraphQL.Schemas.Queries.PersonTest do
}
"""

people_ids =
people_ids =
Person
|> select([:id])
|> order_by(asc: :id)
Expand Down
9 changes: 3 additions & 6 deletions test/zero_phoenix_web/views/error_view_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ defmodule ZeroPhoenixWeb.ErrorViewTest do
import Phoenix.View

test "renders 404.html" do
assert render_to_string(ZeroPhoenixWeb.ErrorView, "404.html", []) ==
"Page not found"
assert render_to_string(ZeroPhoenixWeb.ErrorView, "404.html", []) = "Page not found"
end

test "render 500.html" do
assert render_to_string(ZeroPhoenixWeb.ErrorView, "500.html", []) ==
"Internal server error"
assert render_to_string(ZeroPhoenixWeb.ErrorView, "500.html", []) == "Internal server error"
end

test "render any other" do
assert render_to_string(ZeroPhoenixWeb.ErrorView, "505.html", []) ==
"Internal server error"
assert render_to_string(ZeroPhoenixWeb.ErrorView, "505.html", []) == "Internal server error"
end
end