Dgraph GraphQL Tour

More Data

Movies Schema

Given the previous lesson’s schema, we have provided you here some example queries to run.

{
  queryDirector(filter: { or: [
    { name: { allofterms: "Marc Caro" } }
    { name: { allofterms: "Jean-Pierre Jeunet" } }
  ]}) {
    id
    name
    films {
      name
    }
  }
}
{
  queryGenre(filter: { name: { regexp: "/.*alien.*/i" } }) {
    name
    films(first: 2) {
      name
      starring {
        actor {
          name
        }
        character {
          name
        }
      }
    }
  }
}
{
  queryFilm(filter: { name: { alloftext: "the man runs" } }) {
    name
    starringAggregate {
      count
    }
  }
}

4.2 Movies Schema