Graphql-shield: Wrong order in RuleChain and RuleRace evaluation

Created on 12 Jun 2020  路  7Comments  路  Source: maticzav/graphql-shield

Describe the bug

Here: https://github.com/maticzav/graphql-shield/blob/master/src/rules.ts#L395
And here: https://github.com/maticzav/graphql-shield/blob/master/src/rules.ts#L449

The concatenation is wrong, it will in reverse order compared to the order of the rules potentially leading to some unwanted behaviours.

They should be replaced by [res, ...res] to keep the order of the rules.

bu2-confirmed kinbug

All 7 comments

Hey @Sytten :wave:,

Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider contributing financially.

https://opencollective.com/graphql-shield

PS.: We offer priority support for all financial contributors. Don't forget to add priority label once you start contributing :smile:

Hey 馃憢 ,

Thank you for finding it out! Could you compose a small PR?

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.

Not stale.

Sorry i didnt have time to work on this. Will try to send a PR otherwise I implemented the algo in nexus-shield feel free to copy it.

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.

Not stale.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mhaagens picture mhaagens  路  7Comments

gentle-noah picture gentle-noah  路  4Comments

Paulooze picture Paulooze  路  7Comments

viztor picture viztor  路  6Comments

BjoernRave picture BjoernRave  路  5Comments