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

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

Build:
Build:
LAST BUILD BRANCH: directives
DEFAULT BRANCH: master
Ran 19 Jul 2016 09:51PM UTC
Files 137
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

19 Jul 2016 09:34PM UTC coverage: 98.302%. First build
1077.1

push

travis-ci

leebyron
[FIX] astFromValue uses `serialize()` and requires type.

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.

7178 of 7302 relevant lines covered (98.3%)

1371.15 hits per line

Source Files on job 1077.1
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1077
  • Travis Job 1077.1
  • db46ca97 on github
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