Multiple query - one for predicates and one for shema - in one block?

Hi! In the documentation in noted, than one can put multiple queries in one block.
Can I put one normal (predicate) query and one for the schema in one block?

This did not worked on play.dgraph.io:

  schema
{
  predicate
  type
}
{
  query(func: has(name), first:10){
    name
  }
}

Cheers!

Nope.

if res.Query != nil {
	return res, item.Errorf("Schema block is not allowed with query block")
}

Thank your for your answer.

Maybe it’s not a bad idea to put a note to the documentation here and here that this kind of combining schema and predicate queries is not possible.

Cheers!

I agree, please fill up an issue for docs in Dgraph’s repo.

Done. Thanks :slight_smile: