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

graphql / graphql-js / 831
98%

Build:
DEFAULT BRANCH: master
Ran 23 Mar 2016 02:45AM UTC
Jobs 1
Files 130
Run time 11min
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

pending completion
831

Pull #326

travis-ci

leebyron
[RFC] Add explicit context arg to graphql execution

This *BREAKING* change introduces a new argument to the GraphQL execution API which is presented to resolution functions: `context`.

This solves a long-standing point of confusion about the correct way to represent authentication or a "viewer context" in which a query is executed.

Previously, we suggested that the `rootValue` contain any authentication tokens, however this led to awkward code:

```
resolve: (val, args, { rootValue: { authToken } }) { ... }
```

Which can now be written as:

```
resolve: (val, args, authToken) { ... }
```

The `info` object is still created and provided to resolution functions, and the `rootValue` is still provided within it, however it is now the *fourth* argument rather than the *third*.
Pull Request #326: [RFC] Add explicit context arg to graphql execution

36 of 36 new or added lines in 5 files covered. (100.0%)

6137 of 6175 relevant lines covered (99.38%)

1271.54 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
src/execution/execute.js
Jobs
ID Job ID Ran Files Coverage
1 831.1 23 Mar 2016 02:45AM UTC 0
99.38
Travis Job 831.1
Source Files on build 831
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #831
  • Pull Request #326
  • PR Base - master (#829)
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