Skip to content

Static type-checking for required properties in insertGraph()/upsertGraph() #714

Closed
@jtlapp

Description

@jtlapp

Hey @mceachen, I'm posting this question as an issue because you don't seem to hang out on gitter.

insertGraph() takes a Partial<T>, which doesn't allow compile-time type-checking of required model properties. Is this the best we can do? I thought I'd point it out in case it's not.

Maybe it's this way to deal with readonly properties like id or createdAt/updatedAt? upsertGraph() complicates things by having an optional id.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions