Both the default and other endpoints display formats don't have any settings.

It would be nice to have the possibility to drill down relations some more.

graphapi.module has a lot settings so please tell me how to do ie a depth graph for both dummy field as graphapi and what more features are needed. I'll provide for the patch :-)

graphapi-relation-depth-1.png

graphapi-relation-field-settings.png

Comments

naught101’s picture

Yep. Might need to add some API functions for that too. Were there any other config settings apart from depth that you could think of?

Also, how do you want the data from the 2nd level relations to be stored? I'm still not completely familiar with how graphAPI deals with the data, but I'll try to look into it soon.

naught101’s picture

Hrm.. I'm now thinking that this might actually be a relation-graphAPI specific feature. I can't imagine any other formatters needing this data, can you?

I wonder if we shouldn't just add this to graphapi_relation_field_formatter_view()? (not trying to palm this off on you, promise! :D )

clemens.tolboom’s picture

The data should be similar to include/graph.inc ... graphapi suffers #1209426: Multiple links from A to B are not supported

Some use cases

Depth example:
- Complete graph entities as a list
- Show all entities within distance 2 : related to #1186228: Shortest Path Algorithm

Filtered example: what projects are related to current project
- Show project entities based on relation model : project - issue - comment - user - comment - issue - project

GraphAPI is a little useless without a depth.

Filtering is way more complex but would be nice i.e. for discovering clusters.

clemens.tolboom’s picture

Please tell me how to get ie a depth 2 graph.

Relates to #1186228: Shortest Path Algorithm

naught101’s picture

Um. Basically that would require you to iterate over all the relations in the dummy field (ie. $items), and run relation_get_relations() on each one. I'm not sure what to do with that data once you have it - stick it straight in the graph arrays, I guess.

clemens.tolboom’s picture

Darn ... so no API for that ... :(

naught101’s picture

separate feature request? :P

clemens.tolboom’s picture

Feature request filed under #1221370: Please write a decent relation.api.php

When that one is fixed we could fix this ;-)

naught101’s picture

Project: Relation » Graph API
Assigned: Unassigned » naught101

As far as I can tell, this is Graph API specific - ie. there are no other formatters that would benefit from multiple depth relations, so let's put this in graphapi_relation_field_formatter_view(). I will start work on it as soon as I can.

naught101’s picture

Title: Adding configurations settings to relation_dummy_field » Add search depth as setting for graphapi_relation field display
clemens.tolboom’s picture

Component: Code » Relation module
clemens.tolboom’s picture

Project: Graph API » Graph API Relation
Component: Relation module » Code