dgraph-io / dgraph

The high-performance database for modern applications
https://dgraph.io
Other
20.36k stars 1.49k forks source link

GraphQL variables do not work when uid is nestee #2355

Closed TheEnbyperor closed 6 years ago

TheEnbyperor commented 6 years ago

This query:

query q($userID: uid){
  bookings(func: has(booking)) @cascade {
    uid
    booking.start
    booking.end
    booking.hotel {
      uid
    }
    booking.room {
      uid
    }
    booking.user @filter(uid($userID)) {
      uid
    }
  }
}
pawanrawal commented 6 years ago

Try specifying the type as string and let us know if it still doesn't work.

query q($userID: string){
...
TheEnbyperor commented 6 years ago

Unfortunately that still doesn't work. I pasted in the wrong code there, that query errors. My problem is that nothing is returned.

pawanrawal commented 6 years ago

This is a duplicate of https://github.com/dgraph-io/dgraph/issues/2088. I am working on a fix now.

pawanrawal commented 6 years ago

This should be fixed with 4d6a6077343570518cbe247fa1fbf9320731b09b which would be part of the nightly release.

TheEnbyperor commented 6 years ago

Will try and report back.