Commit Graph

834 Commits

Author SHA1 Message Date
Vladimir Razuvaev
0af2fe79f2 StandardServer: a bit more validation for parsed json PSR-7 request (related to #202) 2017-11-28 12:28:54 +07:00
Vladimir Razuvaev
9d37f4c0d9
Merge pull request #202 from PowerKiKi/support-non-parsed-psr7
Support non pre-parsed PSR-7 request body
2017-11-28 12:01:15 +07:00
Adrien Crivelli
11c9429fab
Support non pre-parsed PSR-7 request body
Because PSR-7 specification only specify that `getParsedBody()` **may**
return the parsed body for `application/json`, we cannot assume that it
is always the case. So if the value returned parsed body is an empty array,
it means we should try to parse it ourselves (`null` would mean no body at
all according to spec).

With this modification we try to used given parsed body, but fallback on
trying to parse the body if necessary. This leave the door open to custom
implementation of parsing if needed, while making it easier to use out of
the box.
2017-11-26 19:57:32 +09:00
Ben Roberts
b18dfd670f testFindsAllDangerousChanges 2017-11-21 12:30:18 -05:00
Ben Roberts
533b8b8b5f testDetectsAdditionsToUnionType 2017-11-21 12:18:28 -05:00
Ben Roberts
e0a63ec792 testDetectsEnumValueAdditions 2017-11-21 11:53:14 -05:00
Ben Roberts
c4ae03454a testFindDangerousArgChanges 2017-11-21 11:50:11 -05:00
Ben Roberts
3c0ed787ba testDetectsAllBreakingChanges 2017-11-21 11:33:45 -05:00
Ben Roberts
dbccf9b196 testDetectsRemovalOfInterfaces 2017-11-20 14:39:06 -05:00
Ben Roberts
0bb689d340 testArgsThatMoveAwayFromNonNull 2017-11-20 14:12:26 -05:00
Ben Roberts
90f35f26a2 testDoesNotFlagArgsWithSameTypeSignature 2017-11-20 13:57:52 -05:00
Ben Roberts
0fd5abc833 testDetectsAdditionOfFieldArg 2017-11-20 13:48:21 -05:00
Ben Roberts
42d8ac07f9 testDetectsFieldArgumentTypeChange 2017-11-20 12:52:49 -05:00
Ben Roberts
4ea6cbe839 bugfix var ref 2017-11-17 17:35:33 -05:00
Ben Roberts
fc9c5e85aa testDetectsRemovalOfFieldArgument 2017-11-17 17:18:26 -05:00
Ben Roberts
cac011246e testDetectsValuesRemovedFromEnum 2017-11-17 16:24:04 -05:00
Ben Roberts
98ce1ccc69 testDetectsIfTypeWasRemovedFromUnion 2017-11-17 16:08:44 -05:00
Ben Roberts
dde2747918 testDetectsNonNullFieldAddedToInputType 2017-11-17 15:56:53 -05:00
Ben Roberts
cf4cccf4d6 testShouldDetectInputFieldChanges 2017-11-17 15:43:16 -05:00
Ben Roberts
68dbcc9ca3 testShouldDetectFieldChangesAndDeletions test 2017-11-17 14:29:47 -05:00
Ben Roberts
b2b5d6f080 findTypesThatChangedKind test 2017-11-17 13:04:01 -05:00
Ben Roberts
d9ce567cc8 findRemovedTypes test 2017-11-17 11:21:05 -05:00
Ben Roberts
4207adc098 change fns to static 2017-11-17 10:54:18 -05:00
Ben Roberts
6bdb7b7f80 improve docstrings 2017-11-16 17:44:08 -05:00
Ben Roberts
af60f1ee4d finish mechanical conversions 2017-11-16 17:42:38 -05:00
Ben Roberts
a1325eeb3f top level API functions, docstrings 2017-11-16 15:53:20 -05:00
Ben Roberts
55f6d6cf47 interfaces and enums 2017-11-16 15:25:25 -05:00
Ben Roberts
6e95b81aee dangerous changes consts 2017-11-16 14:17:21 -05:00
Ben Roberts
e649ef307a couple more functions 2017-11-16 14:15:39 -05:00
Ben Roberts
3811181f49 some functions converted over 2017-11-16 13:53:01 -05:00
Ben Roberts
7aebf2dbf7 initial porting 2017-11-15 16:12:56 -05:00
Vladimir Razuvaev
eaadae4a5b Merge pull request #187 from gabidj/patch-1
Fixed minor bug in example
2017-10-19 12:02:46 +07:00
Gabi DJ
9b449745ab Update graphql.php 2017-10-18 16:34:14 +03:00
Gabi DJ
7f54b1f7e3 removed redundant code and comments
removed redundant code and comments from PR
2017-10-18 16:32:43 +03:00
Gabi DJ
cf3ca86246 $data Unsupported operand types error fix
the operator `+=` only works like `array_merge ($left, $right) ;` if both variables are arrays
2017-10-17 16:47:26 +03:00
Vladimir Razuvaev
57f5ee3783 Fixed typo in docs, see #185 2017-10-16 23:06:21 +07:00
Vladimir Razuvaev
b17b1c3336 Merge remote-tracking branch 'origin/master' 2017-10-14 00:45:55 +07:00
Vladimir Razuvaev
1487741f37 Preserve description for custom scalars (#181) 2017-10-14 00:45:23 +07:00
Vladimir Razuvaev
0c3a657800 Merge pull request #177 from GabrielDeveloper/develop
Improve test coverage
2017-10-05 19:58:23 +07:00
Gabriel Goncalves
440d38d3bc Creating test to Language\Token 2017-10-04 12:06:25 -03:00
Vladimir Razuvaev
fb0ca607e2 Fixed a mistake in the type language documentation (#176) 2017-09-29 20:07:36 +07:00
Vladimir Razuvaev
cb40e111a3 v0.11.1 2017-09-22 23:16:34 +07:00
Vladimir Razuvaev
f7248dec76 Ability to override internal types (using types option of Schema class) #174 2017-09-22 23:08:51 +07:00
Vladimir Razuvaev
d46ad09108 v0.11.0 2017-09-20 19:50:23 +07:00
Vladimir Razuvaev
c5efd1d65b Additional checks for possible fragment spreads 2017-09-20 19:06:04 +07:00
Vladimir Razuvaev
1e34982bda Additional tests for variable coercion + use printSafeJson vs printSafe for input variables 2017-09-20 18:40:45 +07:00
Vladimir Razuvaev
a1e06b2e61 Account for query offset in files for errors 2017-09-20 18:36:19 +07:00
Vladimir Razuvaev
6050af4e67 Add support for directives applied on IDL & Schema 2017-09-20 17:43:06 +07:00
Vladimir Razuvaev
39f378ece7 Fixed type in tests: Testcase -> TestCase 2017-09-20 17:03:22 +07:00
Vladimir Razuvaev
5f5c8118c0 Fixed parseValue of StringType and IDType: (it should return null on invalid value, not throw) 2017-09-20 16:38:02 +07:00