How to add jwt refresh token and pass meta data globaly

DQL only?
Python Client

@Romesh_Shil - what version of Python Client are you using? You could run pip freeze and find out in your local environment.

I am addressing the meta-data item here, our client has a stub in the login call for metadata pydgraph/client_stub.py at 8181aaedf697894cc388d255f899748d87b21112 · dgraph-io/pydgraph · GitHub

I haven’t looked very deep into the JWT side, but when I have a little time I will do that and respond back to this thread.

each and every query login to namespace?
python version: [v21.03.0] (Release v21.03.0 · dgraph-io/pydgraph · GitHub)

client_stub = pydgraph.DgraphClientStub.from_cloud("https://test.us-east-1.aws.cloud.dgraph.io/graphql", "<api-key>") 
client = pydgraph.DgraphClient(client_stub)

client.login_into_namespace("bob", "password", "0")

// Run an upsert in a transaction
query = "{ a as var(func: eq(User.email, /.user@company.io$/)) }"


nquad = """

    uid(a) <User.account_id> "0000002" .

    uid(a) <User.created_on> "2022-09-16 14:00:00" .

 """

 


txn = client.txn()
try: 
  mutation = txn.create_mutation(set_nquads=nquad)
  request = txn.create_request(query=query, mutations=[mutation], commit_now=True)
  res = txn.do_request(request)
  

except Exception as e:

  print(e)

  

finally:

  txn.discard()

I want to login only one time namespace