Ash FrameworkAF
Ash Framework3y ago
3 replies
\ ឵឵឵

`Spark.Dsl.Fragment` validations

It seems that when using Spark.Dsl.Fragment, there are some validations that are happening on the fragment which would be preferable to have happen on the complete resource.

A couple examples:

If I define my code_interface section in a separate file from the actions themselves, the validation fails something like:

The interface of App.Post refers to a non-existent action create


The graphql section doesn't seem to suffer from this particular issue, allowing me to define list,
get
, etc. connectors to actions not defined in the fragment, but isn't happy if I define my type :"..." outside of the fragment, in this case as a transformer of my base resource.

Perhaps the difference between these two has something to do with code_interface's more direct use of a transformer, v. graphql which parses the DSL primarily afterwards as part of the schema macro.

Nonetheless, is there something stopping us from having Spark.Dsl.Fragments—or something similar—assembled into a complete resource before any transformers/validations are run?
Was this page helpful?