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

Update graphql/graphql-relay and add support for Sequelize 6 #715

Merged
merged 1 commit into from
Nov 16, 2022

Conversation

intellix
Copy link
Contributor

@intellix intellix commented Nov 15, 2022

Was hoping to update to Apollo Server 4 and noticed a plethora of peer dependencies getting angry. Noticed that the peer deps here were quite old. Tried:

  • Unit tests passing
  • Integration tests passing

@intellix
Copy link
Contributor Author

to be honest this is even more difficult. I don't think the unit tests pass in Sequelize 3 which are required in devDeps due to instanceof failures in the typeMapper:

sequelizeType instanceof CHAR

If I install Sequelize 6 for testing locally, then I get Promise errors as it expects bluebird which is no longer there...

@mickhansen
Copy link
Owner

@intellix I'd be fine with dropping the legacy support, can publish as a major. The project needs some maintenance of dependencies, running tests is troublesome yes.

@intellix intellix force-pushed the update-graphql-etc branch 2 times, most recently from 69dc855 to 11c554e Compare November 15, 2022 19:49
@intellix
Copy link
Contributor Author

intellix commented Nov 15, 2022

ok all unit and integration tests now pass with:

  • graphql-relay@^0.10 and graphql@^16
  • graphql-relay@^0.9 and graphql@^0.13 || graphql@^14 || graphql@^15

And Sequelize v6+ supported for dataloading (due to the constructor.options and findByPk changes)

@mickhansen
Copy link
Owner

Awesome work @intellix, thank you!

"graphql": "^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14",
"graphql-relay": "^0.4.2 || ^0.5.0 || ^0.6.0",
"graphql": "^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14 || ^15 || ^16",
"graphql-relay": "^0.4.2 || ^0.5.0 || ^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0",
"sequelize": ">=3.0.0"
Copy link
Owner

Choose a reason for hiding this comment

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

Does this need to be bumped also?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, this is one of the main complaints I get when I try to update packages, because 0.10.0 has a peerDep on 16+ https://github.com/graphql/graphql-relay-js/blob/main/package.json#L43

For 16 you need 0.10 and the lower ones still work as well

Copy link
Owner

Choose a reason for hiding this comment

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

@intellix Ah sorry, no I was curious whether we should also bump the peer dep requirement for sequelize. Would v3 still work with these updates?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, apart from the tests now running in v6, all I really added for sequelize was the findByPk in the ternary and fallback to constructor.options

@mickhansen mickhansen merged commit e833cf9 into mickhansen:master Nov 16, 2022
@intellix intellix deleted the update-graphql-etc branch November 16, 2022 09:18
@mickhansen
Copy link
Owner

Released: https://github.com/mickhansen/graphql-sequelize/releases/tag/v9.5.0

@intellix
Copy link
Contributor Author

intellix commented Nov 16, 2022

I'm not sure if it's just me, but it seems like the npm package is mostly empty and missing files:

Screenshot 2022-11-16 at 09 27 27

@mickhansen
Copy link
Owner

@intellix Sorry about that, didn't realize this repo didn't have a prepublish script, please try 9.5.1

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