dotansimha / graphql-tools-rs

40 stars 3 forks source link

feat: UniqueDirectivesPerLocation #30

Closed saihaj closed 2 years ago

saihaj commented 2 years ago

Adds https://spec.graphql.org/draft/#sec-Directives-Are-Unique-Per-Location.

Note: I did not move SDL tests over https://github.com/graphql/graphql-js/blob/5caff039f1f6df0ae85a58c2e1f682804eddce67/src/validation/__tests__/UniqueDirectivesPerLocationRule-test.ts#L199-L393 since we don't really have a way yet to build one.

Closes #13

dotansimha commented 2 years ago

@saihaj rebased it for you :)

saihaj commented 2 years ago

@dotansimha This rule isn't support to error if you are trying to use a directive that is not defined right? if so then I need to do something about it otherwise should be good to merge.

dotansimha commented 2 years ago

@dotansimha This rule isn't support to error if you are trying to use a directive that is not defined right? if so then I need to do something about it otherwise should be good to merge.

yeah it's covered by KnownDirectives rule