Skip to content

Commit

Permalink
fix get_line call
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed Jan 12, 2023
1 parent e01e138 commit ef8a8fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 28 deletions.
2 changes: 1 addition & 1 deletion lib/console/graphql/build.ex
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ defmodule Console.GraphQl.Build do
field :command, non_null(:string)
field :exit_code, :integer
field :stdout, :string, resolve: fn
%{completed_at: nil} = cmd, _, _ -> {:ok, Core.Services.Builds.get_line(cmd)}
%{completed_at: nil} = cmd, _, _ -> {:ok, Console.Services.Builds.get_line(cmd)}
%{stdout: stdo}, _, _ -> {:ok, stdo}
end
field :completed_at, :datetime
Expand Down
34 changes: 7 additions & 27 deletions test/console/graphql/queries/build_queries_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ defmodule Console.GraphQl.BuildQueriesTest do
{:ok, %{data: %{"builds" => found}}} = run_query("""
query {
builds(first: 5) {
edges {
node {
id
}
}
edges { node { id } }
}
}
""", %{}, %{current_user: insert(:user)})
Expand All @@ -36,18 +32,10 @@ defmodule Console.GraphQl.BuildQueriesTest do
query Build($id: ID!) {
build(id: $id) {
id
creator {
id
}
changelogs {
id
}
creator { id }
changelogs { id }
commands(first: 10) {
edges {
node {
id
}
}
edges { node { id stdout } }
}
}
}
Expand All @@ -72,18 +60,10 @@ defmodule Console.GraphQl.BuildQueriesTest do
query Build($id: ID!) {
build(id: $id) {
id
creator {
id
}
changelogs {
id
}
creator { id }
changelogs { id }
commands(first: 10) {
edges {
node {
id
}
}
edges { node { id } }
}
}
}
Expand Down

0 comments on commit ef8a8fe

Please sign in to comment.