You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been attempting to use the SurrealDB Schema Generator to generate zod schemas and TypeScript clients for my SurrealDB database. While the generator works flawlessly when using the "memory" connection URL, I encounter issues when trying to connect to my local SurrealDB instance running via Docker. Specifically, the process hangs indefinitely with a "connect to database" message and fails to proceed further. I'm also able to connect to surrealist.app with the information I add to the config file.
Configuration Used
Below is the surql-gen.json configuration file I'm using:
I've tried various URLs to connect to my local SurrealDB instance:
http://localhost:8000
http://localhost:8000/
ws://127.0.0.1:8000/rpc
ws://127.0.0.1:8000
Additionally, I've confirmed that my normal connection method to SurrealDB using surrealdb.js is through WebSocket URLs like ws://127.0.0.1:8000/rpc, which works fine in my application, but seems incompatible with the schema generator's requirements.
Hey,
thanks for your feedback and sorry for the delay.
I have released version 1.1.3 which has changes in the authentication.
Maybe you want to try out again and let me know if there is still an issue?
As far as I understand, you use a SurrealDB instance within a local docker container with authentication?
Yes, we're running a local SurrealDB instance (with authentication enabled) in a Docker container. With @sebastianwessel/surql-gen version 1.1.3, values of "ws://127.0.0.1:8000" and "ws://127.0.0.1:8000/rpc" work now for the "surreal" parameter in our surql-gen.json file, so this problem is resolved for us. Note that the "http://127.0.0.1:8000" and "http://127.0.0.1:8000/" values still don't work; I get an error message like so:
$ npx surql-gen -c surql-gen.json
connect to database
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^
[Error: There was a problem with the underlying datastore: Cannot connect to the 'HTTP' remote engine as it is not enabled in this build of SurrealDB] { code: 'GenericFailure' }
I've been attempting to use the SurrealDB Schema Generator to generate zod schemas and TypeScript clients for my SurrealDB database. While the generator works flawlessly when using the
"memory"
connection URL, I encounter issues when trying to connect to my local SurrealDB instance running via Docker. Specifically, the process hangs indefinitely with a "connect to database" message and fails to proceed further. I'm also able to connect to surrealist.app with the information I add to the config file.Configuration Used
Below is the
surql-gen.json
configuration file I'm using:Connection URLs Attempted
I've tried various URLs to connect to my local SurrealDB instance:
http://localhost:8000
http://localhost:8000/
ws://127.0.0.1:8000/rpc
ws://127.0.0.1:8000
Additionally, I've confirmed that my normal connection method to SurrealDB using surrealdb.js is through WebSocket URLs like ws://127.0.0.1:8000/rpc, which works fine in my application, but seems incompatible with the schema generator's requirements.
Environment:
Node:
18.19.0
npm:
10.2.3
SurrealDB.js:
0.11.0
sebastianwessel/surql-gen:
1.1.2
The text was updated successfully, but these errors were encountered: