graphql-php/tests
Daniel Tschinder 06c6c4bd97 Validate schema root types and directives
This moves validation out of GraphQLSchema's constructor (but not yet from other type constructors), which is responsible for root type validation and interface implementation checking.

Reduces time to construct GraphQLSchema significantly, shifting the time to validation.

This also allows for much looser rules within the schema builders, which implicitly validate while trying to adhere to flow types. Instead we use any casts to loosen the rules to defer that to validation where errors can be richer.

This also loosens the rule that a schema can only be constructed if it has a query type, moving that to validation as well. That makes flow typing slightly less nice, but allows for incremental schema building which is valuable

ref: graphql/graphql-js#1124
2018-02-13 10:42:35 +01:00
..
Executor Update to match SDL changes 2018-02-11 13:27:26 +01:00
Language New: printError() 2018-02-12 12:23:39 +01:00
Server New: printError() 2018-02-12 12:23:39 +01:00
Type Validate schema root types and directives 2018-02-13 10:42:35 +01:00
Utils Validate schema root types and directives 2018-02-13 10:42:35 +01:00
Validator Fix unhandled error when parsing custom scalar literals. 2018-02-11 22:31:04 +01:00
ErrorTest.php Allow constructing GraphQLError with single node. 2018-02-11 21:18:54 +01:00
ServerTest.php Validate schema root types and directives 2018-02-13 10:42:35 +01:00
StarWarsData.php Updated StarWars tests 2016-10-23 00:46:15 +07:00
StarWarsIntrospectionTest.php Ability to override internal types (using types option of Schema class) #174 2017-09-22 23:08:51 +07:00
StarWarsQueryTest.php Updated executor and it's tests for april2016 specs 2016-09-14 18:47:34 +07:00
StarWarsSchema.php Minor fix to StarWarsSchema type language in comments 2016-11-18 20:32:09 +07:00
StarWarsValidationTest.php Updated executor and it's tests for april2016 specs 2016-09-14 18:47:34 +07:00
UtilsTest.php Leverage PHPUnit setExpectedException() instead of custom code 2018-01-01 18:06:08 +09:00