Following query:
verify: checkUserPassword(email:"user@domain.com",passwd:"mysecret") {
email
}
works OK with dgraph/dgraph:v20.11.0-rc1-9-ge5785d9e0, but panics with dgraph/dgraph:v20.11.0-rc2-5-g2188e742c or dgraph/dgraph:master with:
panic: runtime error: index out of range [0] with length 0.
trace: goroutine 1274 [running]:
runtime/debug.Stack(0xc0027e9870, 0x1c6d560, 0xc00109c140)
/usr/local/go/src/runtime/debug/stack.go:24 +0x9d
github.com/dgraph-io/dgraph/graphql/api.PanicHandler(0xc0027e9f28)
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/api/panics.go:33 +0x57
panic(0x1c6d560, 0xc00109c140)
/usr/local/go/src/runtime/panic.go:969 +0x166
github.com/dgraph-io/dgraph/graphql/resolve.passwordQuery(0x1ff1180, 0xc001c18d20, 0xc001fa8be0, 0x7fcd79e8e438, 0xc001c18d20, 0xc0018c6180)
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/resolve/query_rewriter.go:213 +0x99a
github.com/dgraph-io/dgraph/graphql/resolve.(*queryRewriter).Rewrite(0x30366e8, 0x1fccf00, 0xc001c18510, 0x1ff1180, 0xc001c18d20, 0x0, 0xc001c18db0, 0x8)
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/resolve/query_rewriter.go:157 +0x5e1
github.com/dgraph-io/dgraph/graphql/resolve.(*queryResolver).rewriteAndExecute(0xc001c18d50, 0x1fccf00, 0xc001c18510, 0x1ff1180, 0xc001c18d20, 0xc001c18d50)
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/resolve/query.go:137 +0x22c
github.com/dgraph-io/dgraph/graphql/resolve.(*queryResolver).Resolve(0xc001c18d50, 0x1fccf00, 0xc001c18510, 0x1ff1180, 0xc001c18d20, 0x0)
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/resolve/query.go:86 +0x32d
github.com/dgraph-io/dgraph/graphql/resolve.(*RequestResolver).Resolve.func2.1(0xc0018c6164, 0xc0006ca080, 0x1, 0x1, 0xc0025f8400, 0x1fccf00, 0xc001c18510, 0x1ff1180, 0xc001c18d20, 0x0)
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/resolve/resolver.go:467 +0x165
created by github.com/dgraph-io/dgraph/graphql/resolve.(*RequestResolver).Resolve.func2
/ext-go/1/src/github.com/dgraph-io/dgraph/graphql/resolve/resolver.go:457 +0x1e0