Skip to content

Commit

Permalink
Merge pull request #717 from noaccOS/fix/schema
Browse files Browse the repository at this point in the history
fix(container): schema types
  • Loading branch information
davidebriani authored Nov 14, 2024
2 parents 7aa5053 + 4aa0631 commit f130d6e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion backend/lib/edgehog/containers/deployment.ex
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ defmodule Edgehog.Containers.Deployment do
It starts an Executor, handling the communication with the device.
"""

accept [:release_id, :device_id]
accept [:release_id]

argument :device_id, :id do
allow_nil? false
end

change manage_relationship(:device_id, :device, type: :append)

change Changes.CreateDeploymentOnDevice
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ defmodule EdgehogWeb.Schema.Mutation.DeployReleaseTest do
:ok
end)

[tenant: tenant, release_id: release.id, device_id: device.id]
[
tenant: tenant,
release_id: AshGraphql.Resource.encode_relay_id(release),
device_id: AshGraphql.Resource.encode_relay_id(device)
]
|> deploy_release_mutation()
|> extract_result!()
end
Expand Down

0 comments on commit f130d6e

Please sign in to comment.