I'm currently looking to develop a little more sophisticated query module in C++ and am in need of resources or examples to use as a foundation. I'm aware of the standard documentation and examples provided in C++ docs, I'm searching for something more comprehensive or advanced.
Also I'm interested in finding a library or tool in C++ that offers functionality similar to networkx
in Python, specifically for working with Memgraph. Does anyone know of a library like to graph-tools
but for C++ that would suit this purpose?
EDIT: To clarify, I'm looking for resources beyond the basic examples often found in the official documentation, something that could offer insight into more complex implementations or use cases.
You can check out how MAGE algorithms were implemented https://github.com/memgraph/mage/tree/main/cpp, but they are not really complex. This brings me to the question about complex one, there are a few complex query modules in Mage, for example https://github.com/memgraph/mage/tree/main/cpp/pagerank_module page rank. You could follow any of the developed as a basis of your work. mgp::Graph is just a wrapper around the C-api mgp_graph, this might be helpful https://memgraph.com/docs/custom-query-modules/cpp/cpp-api#graph, if you want to see how it was implemented I suggest checking out this file which contains the C++ api, just search for class graph in the code for example https://github.com/memgraph/memgraph/blob/master/include/mgp.hpp.