themetalfleece / neogma

Object-Graph-Mapping neo4j framework, Fully-typed with TypeScript, for easy and flexible node and relationship operations
https://themetalfleece.github.io/neogma/
MIT License
124 stars 12 forks source link

Documentation outdated #101

Closed EcksDy closed 3 months ago

EcksDy commented 3 months ago

Heya, I've tried neogma today following the examples on README and docs, and couldn't get it to work. For example await Users.createOne({...}) from the example wont accept the object as first param:

Argument of type '{ id: string; name: string; age: number; }' is not assignable to parameter of type 'CreateDataI<Neo4jSupportedProperties, Object>'.
  Types of property 'constructor' are incompatible.
    Type 'Function' has no properties in common with type 'RelationshipTypePropertyForCreateI<unknown, unknown>'.ts(2345)

Main page also suggest neogma.getDriver().close() which doesnt exist anymore. I couldn't find any working code in the docs to get started, but it seems that the repo is active, am I missing something?

themetalfleece commented 3 months ago

Hey there,

I'm a bit busy these days, but reading the error message maybe you haven't defined the appropriate types? Following the docs, you are following the Typescript tab, right?

image

Thanks about the close note, I'll take a look.

EcksDy commented 3 months ago

Ahh I see, I was missing the generics setup, makes sense. I was on the javascript tab, had a feeling I'm missing something :)

themetalfleece commented 3 months ago

Yeah this isn't the first time it happens. I should put the Typescript tab first!