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

graphql / graphql-js / 915
98%

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

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

Jobs
ID Job ID Ran Files Coverage
1 915.1 07 Apr 2016 06:05AM UTC 0
99.47
Travis Job 915.1
Source Files on build 915
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #915
  • c034de91 on github
  • Prev Build on master (#914)
  • Next Build on master (#916)
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