Raphtory icon indicating copy to clipboard operation
Raphtory copied to clipboard

Half way through improving expansion function

Open miratepuffin opened this issue 10 months ago • 0 comments

What changes were proposed in this pull request?

Graphql

  • Added tracing to the graphql server so we can see where bottlenecks are for specific queries
  • Deleted all the filtering apis in graphql as we found them to be exceptionally slow when testing at scale - almost everything in there is also possible to do within the current graph apis anyway so this is just a trap for people to fall in.
  • added 'exclude_nodes_id' to the graphql graph as it was missing.
  • Removed 'node_names' and all the custom 'expand_edges' logic as this can now all be done through the standard APIs
  • The 'edges', 'in-edges' and 'out-edges' functions on the GqlNode now return GqlEdge objects so that you can page/filter them correctly.
  • The 'neighbours', 'in-neighbours' and 'out-neighbours' functions on the GqlNode now return a new GqlPathFromNode object (with the same functions as GqlNodes) so that you can page/filter them correctly.
  • Added a 'keys' argument when calling 'values' on the GqlProperties object - this allows you to select a subset of properties without having to individually request the props you are interested in.

Misc

  • Run black on the python tests
  • Fixed a load of timestamp warnings
  • Removed a load of dead code

Why are the changes needed?

Brings graphql in line with other APIs and removes some pitfuls which will slow people down.

Does this PR introduce any user-facing change? If yes is this documented?

Yes several, and yes

How was this patch tested?

Added tests for the new features and with several internal usecases

Issues

Closes #1590 Close #1038

Are there any further changes required?

Yes, however they are outside the scope of graphql, for example we need to roll PathFromNode and Nodes into one Object.

miratepuffin avatar Apr 25 '24 15:04 miratepuffin