{"push_id":1053103430,"size":2,"distinct_size":1,"ref":"refs/heads/return-type-validation","head":"220b5bfedb9bfec015ffa6c90706960b040435fa","before":"0699f51525a4e2cfb233a67208aa83361f2b498c","commits":[{"sha":"3201ebb825f7bab4ca4856238ade4603e15a5abc","author":{"email":"cdedbaf433217656e9df940dd535438abed9f74c@leebyron.com","name":"Lee Byron"},"message":"Add tests for type comparators","distinct":false,"url":"https://api.github.com/repos/graphql/graphql-js/commits/3201ebb825f7bab4ca4856238ade4603e15a5abc"},{"sha":"220b5bfedb9bfec015ffa6c90706960b040435fa","author":{"email":"cdedbaf433217656e9df940dd535438abed9f74c@leebyron.com","name":"Lee Byron"},"message":"RFC: Return type overlap validation\n\nImplements https://github.com/facebook/graphql/pull/162\n\nThis alters the \"Overlapping Fields Can Be Merged\" validation rule to better express return type validation issues.\n\nThe 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.\n\nInstead 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.\n\nIn 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.\n\n```\n{\n  ... on Person {\n    foo: fullName\n  }\n  ... on Pet {\n    foo: petName\n  }\n}\n```\n\nHowever this can introduce false-negatives!\n\n```\n{\n  ... on Person {\n    foo: birthday {\n      bar: year\n    }\n  }\n  ... on Business {\n    foo: location {\n      bar: street\n    }\n  }\n}\n```\n\nIn the above example, `data.foo.bar` could be of type `Int` or type `String`, it's ambiguous!\n\nThis differing return type breaks some client model implementations (Fragment models) in addition to just being confusing.","distinct":true,"url":"https://api.github.com/repos/graphql/graphql-js/commits/220b5bfedb9bfec015ffa6c90706960b040435fa"}]}