Hi, I am new to TigerGraph but I feel interested and excited in it. I am looking for materials about how to implement subgraph pattern matching in TigerGraph. For example, here is a query which is a fully connected subgraph with four query vertices:
Customer:u1 -> buy -> Product:p
Customer:u2 -> buy -> Product:p
Customer:u3 -> buy -> Product:p
Customer:u1 <- friend -> Customer: u2
Customer:u1 <- friend -> Customer: u3
Customer:u2 <- friend -> Customer: u3
The query describes that three customers buy the same product and they are friends of each other. I wonder how to write a query with GSQL such that if there is a new event that a customer u1 buys a product p, I can find or count all the [u1, p, u2, u3] tuples that match the query subgraph above.
In fact, I also have other subgraphs with different subgraph structures that may not be fully connected, so I want to find a general approach that can express pattern matching for any subgraph using GSQL.
I read the GSQL102 Pattern Matching but the tutorial mainly talks about pattern matching on path-shape subgraph. I am still not sure how to extend from path-shape to any other shape. I wonder if there is some advanced tutorials for this.
I also read Graph Pattern Matching in GSQL which seems to be more relevant to what I want. But I still find difficulty to extend from this blog to general subgraphs. For example, how should I modify the GSQL query in the blog if I add an edge from A to D in the Fig 1 in the blog? As this blog is posted two years ago, I also wonder if TigerGraph has better support for pattern matching on general subgraphs.
Thanks for your time for reading this. Any help is appreciated.