Commit Graph

18 Commits

Author SHA1 Message Date
spawnia
91b72f145d Context is the 3rd, ResolveInfo the 4th resolver argument 2019-06-23 18:25:02 +02:00
Vladimir Razuvaev
9bb8e73277 v0.13.0 2018-11-27 17:23:58 +07:00
Simon Podlipsky
4c327a6c16
Fix CS in Validator folder 2018-08-08 10:44:05 +02:00
Daniel Tschinder
61fe317faf Update docs 2018-02-16 16:50:38 +01:00
Daniel Tschinder
97e8a9e200 Move schema validation into separate step (type constructors)
This is the second step of moving work from type constructors to the schema validation function.

ref: graphql/graphql-js#1132
2018-02-15 12:14:08 +01:00
Daniel Tschinder
9387548aa1 Better Predicates
Introduces new assertion functions for each kind of type mirroring the existing ones for the higher order types.

ref: graphql/graphql-js#1137
2018-02-13 18:04:03 +01:00
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
Daniel Tschinder
f661f38215 Fix unhandled error when parsing custom scalar literals.
This factors out the enum value validation from scalar value validation and ensures the same try/catch is used in isValidLiteralValue as isValidPHPValue and protecting from errors in valueFromAST.
ref: graphql/graphql-js#1126
2018-02-11 22:31:04 +01:00
Daniel Tschinder
d70a9a5e53 Update to match SDL changes
This changes the parsing grammar and validation rules to more correctly implement the current state of the GraphQL SDL proposal (facebook/graphql#90)

ref: graphql/graphl-js#1102
2018-02-11 13:27:26 +01:00
Daniel Tschinder
d6add77540 Add Docs 2018-02-10 18:46:37 +01:00
Vladimir Razuvaev
a1652468f0 Fixed minor error in docblock comment 2017-08-21 00:19:07 +07:00
Vladimir Razuvaev
7f346d5658 Documentation improvements 2017-08-20 22:10:37 +07:00
Vladimir Razuvaev
bd444752f8 Documentation and docblock improvements 2017-08-20 16:00:44 +07:00
Vladimir Razuvaev
009cdecb94 Reference docs generated from docblocks 2017-08-19 23:02:34 +07:00
Vladimir Razuvaev
637156fe65 Further documentation improvements 2017-08-18 02:56:22 +07:00
Vladimir Razuvaev
c04d037fb1 Documentation improvements 2017-08-17 20:35:58 +07:00
Vladimir Razuvaev
1d38643538 Ability to re-throw resolver exceptions 2017-08-17 03:01:23 +07:00
Vladimir Razuvaev
b294329a40 Added reference section to docs 2017-08-17 02:16:45 +07:00