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

Refactor store.service Add support for relations, enums, subscription on Schema Migration #2251

Merged
merged 23 commits into from
Feb 15, 2024

Conversation

bz888
Copy link
Contributor

@bz888 bz888 commented Feb 12, 2024

Description

Fixes and Updates

  • Support Enums
  • Support Subscription
  • Support Relations
  • Cyclic schema
  • Historical (complex schema, multiple relationals)
  • Non-historical (complex schema, multiple relationals)
  • QueryGenerators

Refactor store.serivce to use generate queries instead of sequelize.sync()

Fixes:
#2249
#2241

Documentation:
subquery/documentation#474

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • I have tested locally
  • I have performed a self review of my changes
  • Updated any relevant documentation
  • Linked to any relevant issues
  • I have added tests relevant to my changes
  • Any dependent changes have been merged and published in downstream modules
  • My code is up to date with the base branch
  • I have updated relevant changelogs. We suggest using chan

Copy link
Collaborator

@stwiname stwiname left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One concern i have is that this will break local development, what happens with schema changes when not dealing with projects? The behaviour should be the same as before.

@stwiname
Copy link
Collaborator

There still seems to be quite a few TODOs scattered about

Copy link
Collaborator

@stwiname stwiname left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There still seem to be a couple of TODOs in places

packages/node-core/src/db/index.ts Show resolved Hide resolved
packages/node-core/src/indexer/store.service.ts Outdated Show resolved Hide resolved
packages/node-core/src/db/migration-service/migration.ts Outdated Show resolved Hide resolved
: field.isArray
? getTypeByScalarName('Json')?.sequelizeType
: getTypeByScalarName(field.type)?.sequelizeType;

if (type === undefined) {
if (type === undefined || type === 'undefined') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats going on here? Why would it be 'undefined'?

@stwiname stwiname merged commit 32a5522 into main Feb 15, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants