mickhansen / graphql-sequelize

GraphQL & Relay for MySQL & Postgres via Sequelize
MIT License
1.9k stars 172 forks source link

fix order #711

Closed alichherawalla closed 1 year ago

alichherawalla commented 2 years ago

Hi,

Thank you for this amazing library. We use it extensively and has helped solve a lot of our problems and increase velocity.

However we identified that order doesn't work when using sequelize instead of dataloader-sequelize. Adding in this change fixes it, else it always defaults to ["id", "asc"] for the order.

mickhansen commented 2 years ago

How does your code look that you are passing options.order? To my knowledge createConnectionResolver / createConnection do not take these, are you modifying in a hook?

alichherawalla commented 1 year ago

Hi, apologies for the delay in response.

I get order since I use defaultListArgs

alichherawalla commented 1 year ago

Hi @mickhansen,

Possible to please get a review?

mickhansen commented 1 year ago

HI @alichherawalla, sorry about the delay, could you add a test to guard against regression?

alichherawalla commented 1 year ago

Hi,

Just saw this. Yes will add it in @mickhansen

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.