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

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

Build:
DEFAULT BRANCH: master
Ran 07 Apr 2016 06:05AM UTC
Files 132
Run time 4s
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

07 Apr 2016 06:00AM UTC coverage: 99.467% (+0.002%) from 99.465%
915.1

push

travis-ci

leebyron
RFC: Return type overlap validation

Implements https://github.com/facebook/graphql/pull/162



This alters the "Overlapping Fields Can Be Merged" validation rule to better express return type validation issues.



The existing rule has presented some false-positives in some schema where interfaces with co-variant types are commonly used. The "same return type" check doesn't remove any ambiguity.



Instead what that "same return type" check is attempting to prevent is spreading two fragments (or inline fragments) which have fields with return types where ambiguity would be introduced in the response.



In order to curb false-positives, we later changed this rule such that if two fields were known to never apply simultaneously, then we would skip the remainder of the rule.



```

{

  ... on Person {

    foo: fullName

  }

  ... on Pet {

    foo: petName

  }

}

```



However this can introduce false-negatives!



```

{

  ... on Person {

    foo: birthday {

      bar: year

    }

  }

  ... on Business {

    foo: location {

      bar: street

    }

  }

}

```



In the above example, `data.foo.bar` could be of type `Int` or type `String`, it's ambiguous!



This differing return type breaks some client model implementations (Fragment models) in addition to just being confusing.

6345 of 6379 relevant lines covered (99.47%)

1292.51 hits per line

Source Files on job 915.1
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 915
  • Travis Job 915.1
  • c034de91 on github
  • Prev Job for on master (#914.1)
  • Next Job for on master (#916.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