siteforge-io / surreal-codegen

SurrealDB code generation library inspired by GraphQL codegen tooling
MIT License
16 stars 0 forks source link

Migrate to 'surreal' #1

Closed DrewRidley closed 1 month ago

DrewRidley commented 1 month ago

At the moment, the generated script seems to import 'surrealdb.js' but this has been deprecated in favor of surreal. It is not possible to connect to a 2.0 instance without explicitly using beta 18.

The generated code should be updated accordingly. Thanks!

AlbertMarashi commented 1 month ago

@DrewRidley good point, it is actually possible to override the header, if you run surreal-codegen --help you will receive information on how to do that.

I will update the code accordingly however

AlbertMarashi commented 1 month ago

@DrewRidley I've closed this issue with a fix and you can read the documentation for updating the header in case you were curious or need to override the default class instance or provide a eslint ignore comment.

You can update to the latest version to get the new changes