TigerGraph GraphQL Service

Hi Guys,
We are investigating the Graphql support for TigerGraph and found this demo. Quickstart :: Docs
We tested it and it works well. But I still have two questions in my mind need to answer before moving forward.
The first one is, as looks like that binary tarball service is always needed and can not be modified, do you guys have any plan to release it as a library then we can integrate it with our service?
The second one is, when I tested with some use cases, like the people who worked with the person I queried, I found it will return null even I filter the input person out, also the attribute that in that edge is not able to be filtered out. Example here

query {
  DemoGraph {
    person(whereExpr: "name == \"Tom\"") {
      name
      work_at {
        title
        to {
          name
          reverse_work_at {
            title
            to (where:{name: {_neq: "Tom"}}) {
              name
            }
          }
        }
      }
    }
  }
}

It will return as

{
  "data": {
    "DemoGraph": {
      "person": [
        {
          "name": "Tom",
          "work_at": [
            {
              "title": "CTO",
              "to": {
                "name": "Hooli",
                "reverse_work_at": [
                  {
                    "title": "CTO",
                    "to": null
                  },
                  {
                    "title": "HR Staff",
                    "to": {
                      "name": "Emily"
                    }
                  }
                ]
              }
            }
          ]
        }
      ]
    }
  },
  "errors": null
}

We want the title CTO and null to are filtered out in the response like we can exclude the edge in GSQL. Not sure if there is any sample query that can achieve the goal.
Thanks for reply and help.

Hi lqian,

Thanks for your interest in using TigerGraph GraphQL!
As of today, the GraphQL service is a separate binary. We do have the plan to integrate it into TigerGraph core product so that users don’t need to start and manage a separate service. Our plan is to finish the integration in Q2.
The 2nd is expected output in our case. This is because GraphQL is taking a left-join semantic, and the filter on target vertex of an edge will not prone back its parent edge. In order to filter out these edges, we need to support complex object conditions on the edge that can refer to target vertex attributes, which is not supported yet. Currently the walk-around is to filter the edge based on the “to” field null value in application logic

2 Likes

Hi Renchu

Thanks for the quick response and update!
Looking forward to all those new features!

1 Like