How can I expand only UID predicates from nodes?

Well, your node has two types. There’s no logic separation when you have multiple types as far I know. But you could try this to check it.

{ 
  q(func:  type(Student) ) { 
   expand(_all_)
    }
 }

Right now we still improving the type system. So I’m not 100% sure if there is a logic separation on multiple types. I’ll check too.

Update:

yep, there’s no logic separation.

{
  set {
    <_:a> <name> "Lucas" .
    <_:a> <class> "Geology" .
    <_:a> <dgraph.type> "Person" .
    <_:a> <dgraph.type> "Student" .
  }
}

The result for q(func: type(Student) ) was

{
  "data": {
    "q": [
      {
        "name": "Lucas",
        "class": "Geology"
      }
    ]
  }