Querying hard coded data

Hi everyone!

I was wondering if that is possible, something like:
{
result (func: eq(email, “example@me”)) {
“Hi there!” # Hard coded data
name
}
}

Hi @jaetmar

Queries in Dgraph work starting from a root node and fetch attributes of that node. Queries can fetch other nodes and their attributes as well if they are linked to the root node via a predicate.

Example:

{
  my(func: eq(name@fr, "Jean-Pierre Jeunet")){
    name@en
    director.film{
        name@en
  	}
  }
}

Above query would find out the node with name that equals Jean-Pierre Jeunet, return name@en and also traverse the edges director.film to return movies directed bu the root node.

Do you want to query a string which is not stored in a node/predicate?
Can you tell us what you are trying to do with a query like that?

Thanks
Anurag

Ha, just like this?

I add some code and re-compile the dgraph myself, then I can do query this way.