• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

graphql / graphql-js / 1922 / 1
98%
master: 98%

Build:
Build:
LAST BUILD BRANCH: directives
DEFAULT BRANCH: master
Ran 14 Apr 2017 09:00PM UTC
Files 151
Run time 10s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Apr 2017 08:53PM UTC coverage: 97.987%. First build
1922.1

push

travis-ci

leebyron
[RFC] Export all validation rules directly

It's become relatively standard to create a whitelist or blacklist of validation rules, and reaching into the package per rule can get messy. This exports all the rules at the higher levels of submodule and module as well to make this easier.

For explaination of whitelist of blacklist:

```js
// Whitelist
import { specifiedRules, ScalarLeafs } from 'graphql';

// A ruleset which only runs one rule.
const whitelistRules = [ ScalarLeafs ];
```

```js
// Blacklist
import { specifiedRules, ScalarLeafs } from 'graphql';

// A ruleset which only runs all but one rule.
const blacklistRules = specifiedRules.filter(rule => rule !== ScalarLeafs);

// Note: the wrong way to do a blacklist would be to import and specify all
// but one rule. That's a whitelist and would fail to pick up any added
// validation rules that may be amended to spec in the future.
```

2960 of 3268 branches covered (90.58%)

8374 of 8546 relevant lines covered (97.99%)

1322.05 hits per line

Source Files on job 1922.1
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 1922
  • Travis Job 1922.1
  • f6851fe1 on github
  • Next Job for on export-rules (#1924.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc