sezaru
What warning "does not have an input type defined" means for embedded resources?
I have this resource in my code:
defmodule Core.Marketplace.Payments.Product.Types.Test do
@moduledoc false
use Ash.Resource,
data_layer: :embedded,
extensions: [AshGraphql.Resource]
attributes do
timestamps(public?: true)
end
graphql do
type :payments_product_test
end
end
And I use it in this type:
defmodule Core.Marketplace.Payments.Product.Types.Metadata do
@moduledoc false
alias Core.Marketplace.Payments.Product.Types
use AshGraphql.Type
use Ash.Type.NewType,
subtype_of: :union,
constraints: [
types: [
...,
test: [type: Types.Test, tag: :type, tag_value: :test]
]
]
@impl true
def graphql_type(_), do: :payments_product_metadata
end
When I compile this, I get this warning:
warning: Embedded type Core.Marketplace.Payments.Product.Types.Test does not have an input type defined, but is accepted as input in at least one location.
(ash_graphql 1.8.3) lib/resource/resource.ex:4835: AshGraphql.Resource.do_field_type/5
(ash_graphql 1.8.3) lib/resource/resource.ex:3715: anonymous fn/4 in AshGraphql.Resource.union_type_definitions/6
(elixir 1.18.4) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2
(elixir 1.18.4) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2
(ash_graphql 1.8.3) lib/resource/resource.ex:3707: AshGraphql.Resource.union_type_definitions/6
(elixir 1.18.4) lib/enum.ex:4442: Enum.flat_map_list/2
What does this means?
Marked As Solved
Popular in Questions
Hello, how can I check the Phoenix version ?
Thanks !
New
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
I tried installing
elixir 1.11.2
erlang 23.3.4
via asdf in my zsh shell. Enabled the versions locally and globally.
When I list them ...
New
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
Other popular topics
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible.
total = 10
while total != 0
...
New
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
Latest Ash Threads
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security









