Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: JS SDK docs improvements #890

Open
2 tasks done
knackstedt opened this issue Sep 24, 2024 · 1 comment
Open
2 tasks done

Documentation: JS SDK docs improvements #890

knackstedt opened this issue Sep 24, 2024 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@knackstedt
Copy link

Description

Following the documentation at https://surrealdb.com/docs/sdk/javascript/engines/node I noticed that it creates a seemingly impossible to satisfy condition due to the types of objects that the npm package provides. See the screenshot.

image

Currently running the latest versions of the surrealdb and surrealdb.node packages.
image

Additionally, I noticed that the export name has changed from this example and that the previous link for "Engines" leads to a 404 page.

Related to #500

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@knackstedt knackstedt added the documentation Improvements or additions to documentation label Sep 24, 2024
@Ekwuno Ekwuno self-assigned this Sep 25, 2024
@knackstedt
Copy link
Author

I noticed that the import for surrealdbNodeEngines is indeed provided by the surrealdb.node package, but under a specific file export like so:

import { surrealdbNodeEngines } from 'surrealdb.node/lib/embedded';

Notably it doesn't match the types of engines either, so this is probably a case of the npm package(s) needing to be updated to be in-sync with each other's APIs.

image

import Surreal from 'surrealdb';
import { SurrealdbNodeEngine } from 'surrealdb.node';
import { surrealdbNodeEngines } from 'surrealdb.node/lib/embedded';

const dbc = new Surreal({
    engines: surrealdbNodeEngines(),
});

@Ekwuno Ekwuno changed the title Documentation: Embedded NodeJS docs improvements Documentation: JS SDK docs improvements Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants