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

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

Build:
Build:
LAST BUILD BRANCH: directives
DEFAULT BRANCH: master
Ran 14 Apr 2017 09:19PM UTC
Files 151
Run time 8s
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 09:17PM UTC coverage: 97.987%. Remained the same
1924.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 1924.1
  • Tree
  • List 0
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 1924
  • Travis Job 1924.1
  • 8e3c9c18 on github
  • Prev Job for on export-rules (#1922.1)
  • Next Job for on export-rules (#1926.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