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

graphql / graphql-js / 1082
98%

Build:
DEFAULT BRANCH: master
Ran 19 Jul 2016 10:40PM UTC
Jobs 1
Files 137
Run time 9s
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
1082

push

travis-ci

web-flow
[FIX] astFromValue uses `serialize()` and requires type. (#441)

A bug was reported in #435 and reproduced in #438 which illustrates an issue where defaultValue would serialize incorrectly or even throw an invariant violation when working with input objects or enums backed by values other than their names.

The root of the issue is that astFromValue accepts an *internal* value, but then produces an AST directly from that value without serializing it to an *external* value first via calling `type.serialize(value)`. This critical missing step is responsible for the reported issue.

In order to fix correctly, this refactored this method to be a closer dual to [`valueFromAST`](https://github.com/graphql/graphql-js/blob/master/src/utilities/valueFromAST.js), relying on the GraphQL type rather than the JavaScript type to guide coercion. As a consequence, `astFromValue` now *requires* a type rather than accepting one optionally.

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

7178 of 7302 relevant lines covered (98.3%)

1371.15 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
100.0
src/utilities/astFromValue.js
Jobs
ID Job ID Ran Files Coverage
1 1082.1 19 Jul 2016 10:40PM UTC 0
98.3
Travis Job 1082.1
Source Files on build 1082
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1082
  • b080bf52 on github
  • Prev Build on master (#1081)
  • Next Build on master (#1083)
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