Ash FrameworkAF
Ash Framework3y ago
11 replies
moxley

How to represent an embedded schema in AshGraphql

I have an existing Ecto schema that has an embedded_field, which itself is backed by an Ecto schema. How do I use the attributes DSL to expose this field in my AshGraphql query?

Here's the field in Ecto: embeds_one :details, Details

I tried this in the Ash attributes: attribute :details, :map, but the GraphQL response had this error: Field "details" must not have a selection since type "JsonString" has no subfields.
Was this page helpful?