my dgraph verison is v20.07.0 and dgraph4j version is v20.03.0.
I added a “–auth_token hello” option to alpha.
I added a header for my grpc request according to this document
like this:
//add alpha auth token.
Metadata metadata = new Metadata();
metadata.put(
Metadata.Key.of("X-Dgraph-AuthToken", Metadata.ASCII_STRING_MARSHALLER), "hello");
stub = MetadataUtils.attachHeaders(stub, metadata);
But when I alter the schema, I still get this error.
java.lang.RuntimeException: UNKNOWN: No Auth Token found. Token needed for Alter operations.
I tried to do the same with curl, and there was no problem.