Closed mrparalon closed 5 months ago
Describe the bug
I'm following the instruction about auth extension
Example for js client from docs
const client = createClient().withGlobals({ "ext::auth::client_token": auth_token, });
But python client return an error "Illegal name" when I set global like this
client = edgedb.asyncio_client.create_async_client().with_globals({ "ext::auth::client_token": "example" })
It happens in resolve function, because it expects 1 or 2 :: in module path
resolve
::
If it will be useful for someone, I have workaround
client = edgedb.asyncio_client.create_async_client().with_module_aliases( {"auth": "ext::auth"}.with_globals({"auth::client_token": edgedb_auth_token}))
Reproduction Include the code that is causing the error:
import edgedb client = edgedb.asyncio_client.create_async_client().with_globals({ "ext::auth::client_token": "example" })
Expected behavior Setting global works according to docs
Versions (please complete the following information):
edgedb-python
Describe the bug
I'm following the instruction about auth extension
Example for js client from docs
But python client return an error "Illegal name" when I set global like this
It happens in
resolve
function, because it expects 1 or 2::
in module pathIf it will be useful for someone, I have workaround
Reproduction Include the code that is causing the error:
Expected behavior Setting global works according to docs
Versions (please complete the following information):
edgedb-python
version: 1.8.0