What is seed set exactly?

I have two (noob) questions about this page: https://docs.tigergraph.com/start/gsql-102/one-hop-patterns

(Sorry, I’m still trying to wrap my head around the syntax…)

  1. I’m a little confused by the documentation here, but I believe that the “seed set” means set of vertex types that query is searching for. IMHO, this example isn’t particular illustrative because the set contains only one Type. Assuming I understand this (which I’m not so sure…), I suggest this improvement:
    CREATE QUERY seedSet() FOR GRAPH ldbc_snb SYNTAX v1 {
        Source = {Person, University}; // Seed set of vertex types
        SELECT t FROM Source:s -(IS_LOCATED_IN:e)- :t;
        PRINT t;
  1. [edit: indeed this was a trivial error, so it’s less important. I removed reference to this from the title of the question] It seems like the PRINT f; statement is incorrect. f hasn’t been defined anywhere. Was t meant?
    CREATE QUERY seedSet() FOR GRAPH ldbc_snb SYNTAX v1 {
        Source = {Person}; // Seed set 
        SELECT t FROM Source:s -(IS_LOCATED_IN:e)- :t;
        PRINT f;

Maybe even add Company to the seed set, in which case t can return either a City vertex type (for Person or University type vertices) or a Country (for Company type vertices).


  1. This was a typo. PRINT f should be PRINT t. We’ve fixed it; thanks for reporting it.
  1. The term seed set refers to what you start with, not what you are looking for.
    The seed set is called Source in this example.

Source, start, seed – all words that refer to a beginning.

I understand “seed set”, what I’m not clear on is “seed set” of what? The example seems to show a seed set of Vertex types. Could the seed set be a set of Vertex instances?

It is a set of vertex instances. However, you have several options for specifying which vertex instances you want to include. One of the options is to name one or more vertex types.

You are looking at the GSQL 102 tutorial. If you go back to GSQL 101, it talks about the seed set and starts with an example where the seed is a single vertex instance:

Ah… that’s a subtle point, since in the expression:
Source = {Person};
Person is a vertex type and not an instance of a person.

I guess that means the expression {Person} implicitly return all vertices of the Person type?

And therefore, the expression:

Source = {Person, University};

would return all vertices of both the Person and University type?

And I suppose you could have a seed set that is a mixture of Vertex types and instances of Vertices?

Thanks for the clarification.