Multiple Node Labels #157
matt-beanland
started this conversation in
Ideas
Replies: 1 comment
-
|
Current state of play is that nodes a labelled with two labels on create, a domain_label and (resource) label. The resource label can be specified or derived from the resource module. The domain label is always derived from the domain module. Polymorphism can be achieved using extensions, where the resource being extended by a fragment will be labelled based as above, these labels will be applied when the actions are done from the extended resource. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Node labels in neo4j are very flexible, initially we've used them sparingly allowing single label per resource, which should be unique. It would be good to add support for multiple labels, this allows more options with classifying nodes in the graph.
We could extend the neo4j dsl to populate multiple labels, or to provide a custom option. By default we label using the short_name.
One use case encountered with using ash_neo4j is to have a base resource in a domain and more customised resources in another domain. We'd like the customised resources to be operable on the base domain API as well the custom functionality on the custom domain API, so we'd need the node to have at least the base label. But we'd like to have custom labels, which may be the specific to the domain and the resource.
The neo4j dsl in the base resource could include a custom function, which may be able to call/introspect the custom resource.
Beta Was this translation helpful? Give feedback.
All reactions