Commit Graph

9 Commits

Author SHA1 Message Date
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
Vladimir Razuvaev
794d3672ef Initial pass on standard server implementation (also deprecated current GraphQL\Server which is undocumented anyway) 2017-07-14 19:44:18 +07:00
Vladimir Razuvaev
296544089c Moved GraphQL\Utils to GraphQL\Utils\Utils 2017-07-10 19:53:46 +07:00
Daniel Tschinder
65ef159ddc
Support PHP7 error exceptions everywhere
Also replace \Error with \Throwable
2017-06-25 07:33:28 -07:00
Vladimir Razuvaev
827bfa7907 Server: added missing return $this; statements 2017-02-27 18:19:09 +07:00
vladar
c18cd16960 GraphQL\Server: set PromiseAdapter before executing query 2017-01-26 19:24:53 +07:00
vladar
2ddae2bf88 Added EXPERIMENTAL note for code related to type resolution strategies 2017-01-26 18:59:14 +07:00
vladar
e2875953e1 Tests for new GraphQL\Server facade 2017-01-19 19:23:00 +07:00
vladar
296cc7530d Added Server class as a new facade for library, including HTTP endpoint compatible with express-graphql format 2016-12-19 20:40:46 +07:00