Mark Huot
7249e2611a
Fix possessive its vs contraction it's
2018-11-11 07:59:45 -05:00
Jakub Kulhan
b5d3341995
Pluggable executor implementations; new faster executor using coroutines
2018-11-06 23:32:50 +01:00
David B. Nagle
f39f0f5517
Fixed misspelling "defintion" in several places
2018-11-03 15:35:18 -07:00
Vladimir Razuvaev
23169603fc
Removed old experimental code
2018-11-03 23:25:23 +07:00
jbtbnl
427ac1b5d5
Fix resolve Fn key
2018-10-26 12:09:14 +02:00
Simon Podlipsky
644f97634b
Little fixes
2018-10-22 23:37:28 +02:00
Vladimir Razuvaev
6cce6742eb
Merge pull request #367 from simPod/phpstan-strict
...
Use PHPStan strict rules
2018-10-22 17:28:59 +02:00
Vladimir Razuvaev
5fb970b3f1
Codestyle fix
2018-10-10 11:41:24 +02:00
Vladimir Razuvaev
4bc9dfc6f8
Reverted unneeded change in the defaultFieldResolver
2018-10-10 11:29:14 +02:00
Vladimir Razuvaev
c7fcd4eb48
Got rid of PHP_EOL usages (we never do or expect carriage returns)
2018-10-10 11:26:48 +02:00
Simon Podlipsky
90d0156291
Use PHPStan strict rules
...
Two rules excluded: missing type hints and empty() usage
2018-10-09 17:46:55 +02:00
Jáchym Toušek
e4c743cf8c
Fix annotation
2018-10-09 14:46:41 +02:00
Torsten Blindert
e7de069bd5
FEATURE: SchemaExtender ( #362 )
...
FEATURE: SchemaExtender (#362 )
2018-10-08 15:55:20 +02:00
Gilles Maes
7ff3e9399f
Expand is_array check in defaultTypeResolver to allow for ArrayAccess… ( #361 )
...
Expand is_array check in defaultTypeResolver to allow for ArrayAccess objects as well
2018-10-08 15:53:07 +02:00
Simon Podlipsky
dd4a5076f6
Fix CS in src/Validator
2018-10-05 10:47:58 +02:00
Simon Podlipsky
e664c4455e
Fix CS in src/Utils
2018-10-05 10:47:58 +02:00
Simon Podlipsky
18a5639cb7
Fix CS in src/Type
2018-10-05 10:47:57 +02:00
Simon Podlipsky
7ba98ce773
Fix CS in src/Server
2018-10-05 10:47:57 +02:00
Simon Podlipsky
a95d2ad140
Fix CS in src/Language
2018-10-05 10:47:57 +02:00
Simon Podlipsky
bfebcd7bee
Fix CS in src/Executor
2018-10-05 10:47:57 +02:00
Simon Podlipsky
0063bd6c15
Fix CS in src/Error
2018-10-05 10:47:57 +02:00
Simon Podlipsky
73e75b6314
Fix CS in src
2018-10-05 10:47:57 +02:00
Torsten Blindert
5f5c7d89be
TASK: Code style #4
2018-10-02 09:58:44 +02:00
Torsten Blindert
5a1caf0549
TASK: Code style #2
2018-10-02 09:34:29 +02:00
Torsten Blindert
a3d050ff6b
TASK: Code style
2018-10-02 09:09:12 +02:00
Torsten Blindert
0262f59a3f
BUGFIX: Directives args have to be FieldArguments, not FieldDefinitions
2018-10-01 20:28:05 +02:00
Torsten Blindert
b65aa4e657
TASK: Change KnownDirectives rule to match reference
...
https://github.com/graphql/graphql-js/blob/master/src/validation/rules/KnownDirectives.js
2018-10-01 19:48:56 +02:00
Torsten Blindert
b1cd086177
TASK: Allow Schema extensions
2018-10-01 19:46:36 +02:00
Torsten Blindert
0c33cfa88f
TASK: Allow UnionType extensions
2018-10-01 19:45:48 +02:00
Torsten Blindert
1dc2b939cb
TASK: Allow ScalarType extensions
2018-10-01 19:45:36 +02:00
Torsten Blindert
b0ee36feb4
TASK: Allow InputObjectType extensions
2018-10-01 19:45:20 +02:00
Torsten Blindert
1d15ae7f3e
TASK: Allow EnumType extensions
2018-10-01 19:44:55 +02:00
Simon Podlipsky
450a1932e5
Fix typo and cleanup
2018-09-09 17:32:53 +02:00
spawnia
c4fe304efe
Fix coding style
2018-09-03 21:43:02 +02:00
Benedikt Franke
e7513e356a
Merge branch 'master' into patch-1
2018-09-03 21:25:36 +02:00
spawnia
326e0b4719
Add Debug::RETHROW_UNSAFE_EXCEPTIONS flag
...
This allows for a more granular default for which Exceptions are thrown, taking
the settings made through the ClientAware interface into account.
- Add docs
- Add a test case
- Differentiate clearly from other test
2018-09-03 21:18:04 +02:00
Jeremiah VALERIE
eed9cc7f1b
Give some love to PHP CS
2018-09-02 18:26:35 +02:00
Jeremiah VALERIE
18954ea655
Fix typehint
2018-09-02 17:19:16 +02:00
Jeremiah VALERIE
05dbc0fb96
Fix sprintf call
2018-09-02 17:19:16 +02:00
Jeremiah VALERIE
d8f41e854f
Add static analysis tool
2018-09-02 17:19:15 +02:00
Simon Podlipsky
7dbd72cebf
Check CS in the whole project
...
Closes #284
2018-09-02 16:46:58 +02:00
Simon Podlipsky
76e1c33b68
Fix CS in src
2018-09-02 10:39:03 +02:00
Benedikt Franke
503ac4619a
Check if an exception is internal before rethrowing
2018-08-31 17:45:41 +02:00
Simon Podlipsky
00d547dc06
Fix CS in src/Type
2018-08-27 18:14:07 +02:00
Vladimir Razuvaev
8817e8e010
Throws descriptive error when non-type used instead of interface
2018-08-22 18:53:25 +07:00
Vladimir Razuvaev
227f0b867d
Serial execution should support sync execution (+tests for the serial execution)
2018-08-22 15:10:10 +07:00
Vladimir Razuvaev
d87c1aba5c
Additional printer test
2018-08-22 12:28:13 +07:00
Vladimir Razuvaev
90623f68d7
Fixed code style after recent changes
2018-08-22 12:07:21 +07:00
Vladimir Razuvaev
00caed811b
Fixed SchemaPrinter (broken after the recent merge)
2018-08-22 11:45:54 +07:00
Vladimir Razuvaev
9ae8b9f26e
Merge branch 'master' of https://github.com/webonyx/graphql-php
...
# Conflicts:
# src/Utils/AST.php
2018-08-22 11:43:30 +07:00
Simon Podlipsky
49f34d3243
Fix CS in Utils
2018-08-22 02:51:55 +02:00
Vladimir Razuvaev
d44ec9e809
Merge branch 'master' of https://github.com/webonyx/graphql-php
...
# Conflicts:
# src/Utils/AST.php
2018-08-21 22:10:50 +07:00
Vladimir Razuvaev
a3ef1be1ab
Merge pull request #323 from simPod/language-cs
...
Fix CS in src/Language
2018-08-21 22:00:01 +07:00
Simon Podlipsky
ad8693cb8a
Fix CS in src/Language
2018-08-20 20:26:21 +02:00
Vladimir Razuvaev
23fce6385f
Merge pull request #319 from jrots/master
...
Fix for fatal php error: Call to a member function getLocation() on null, before normal error handling
2018-08-20 16:27:10 +07:00
Vladimir Razuvaev
64c463e889
Schema: getTypeMap() should include input types defined in directive arguments
2018-08-08 15:47:42 +07:00
Simon Podlipsky
4c327a6c16
Fix CS in Validator folder
2018-08-08 10:44:05 +02:00
Vladimir Razuvaev
56e91d008e
Update printSchema for recent SDL change to implements
2018-08-08 15:07:08 +07:00
Vladimir Razuvaev
fcb9c24bb5
Fix astFromValue to correctly handle integers and strings
2018-08-08 14:57:44 +07:00
Vladimir Razuvaev
49ec89b28f
Fixed broken description printing
2018-08-08 01:46:32 +07:00
Vladimir Razuvaev
d9aee43129
Printer: created special function to add descriptions
2018-08-08 01:28:34 +07:00
Vladimir Razuvaev
a19fc3d208
RFC: SDL - Separate multiple inherited interfaces with &
2018-08-08 01:11:47 +07:00
Vladimir Razuvaev
8e02fdc537
Parser: allowLegacySDLEmptyFields option + minor naming tweaks
2018-08-08 00:41:20 +07:00
Vladimir Razuvaev
4227404aee
Added test for useful error when returning invalid value from resolveType
2018-08-07 23:33:20 +07:00
Vladimir Razuvaev
f4008f0fb2
Error formatting: display error extensions under extensions
key
2018-08-07 23:33:20 +07:00
Vladimir Razuvaev
39df711eac
More definition tests (for type validation)
2018-08-07 23:32:26 +07:00
Jayme Rotsaert
942d4995c5
Fix: fatal Call to a member function getLocation(), before normal error is thrown
2018-08-01 18:16:48 +02:00
Robbie Averill
c962afc566
FIX Ensure that __toString return value is always casted as a string
...
`json_encode` can return false on failure, which causes PHP errors since `__toString` must return a string.
2018-07-30 16:36:09 +12:00
Vladimir Razuvaev
2f2b54a3d6
Perf: memoize collectSubfields
2018-07-30 00:36:10 +07:00
Simon Podlipsky
1b42de0658
@return self
2018-07-10 01:34:35 +03:00
Simon Podlipsky
ec2ff0d4bf
CS /Server
2018-07-10 01:34:35 +03:00
Théo FIDRY
c1a62fdb05
Allow stringeable objects to be serialized by StringType
...
Closes #302
(cherry picked from commit c258109
)
2018-07-08 04:44:10 +07:00
Vladimir Razuvaev
e515964a73
Merge pull request #295 from simPod/refactoring
...
Executor: fixed code style / minor refactoring
2018-07-07 21:58:54 +07:00
Iain Mckay
750ce383ec
Adds support for the multipart/form-data content type
2018-07-05 08:52:29 +02:00
Simon Podlipsky
cd1cc911e7
Refactoring
2018-06-26 14:37:19 +02:00
Daniel Tschinder
6e64983f82
Use multi-line block for trailing quote
...
ref: fdc10bb918 (diff-ebaed8492e8d884ee4f2255e39909568)
2018-06-25 14:26:53 +02:00
Vladimir Razuvaev
5a90e9bd64
Merge pull request #288 from simPod/phpcs
...
RFC: PHP CS
2018-06-23 12:32:26 +07:00
Daniel Tschinder
8ba146071d
Fix wrong length being used in validator.
2018-06-22 16:56:19 +02:00
Simon Podlipsky
4bc3b7885c
Fix CS in Error folder
2018-06-19 19:50:12 +02:00
Vladimir Razuvaev
9452655fcd
Merge pull request #281 from icerockdev/master
...
Removing data elements from response if the error throwing
2018-05-27 20:02:14 +07:00
Vladimir Razuvaev
1b22f95a86
Removed previously deprecated classes/methods
2018-05-27 19:13:32 +07:00
Ilya Shaydullin
06490cae8b
Fix is null condition
2018-05-07 17:12:21 +07:00
Ilya Shaydullin
c7f114d90b
Removing data elements from response if the error throwing
2018-05-07 17:01:18 +07:00
Daniel Tschinder
62748279d4
Cleanup imports
2018-04-24 15:38:44 +02:00
Daniel Tschinder
f140149127
Make Types throw instead of returning Utils::undefined()
2018-04-24 15:14:31 +02:00
Adrian Philipp
b3791378fa
Return early if rules are empty to avoid visiting elements
...
This is tested already in testPassesValidationWithEmptyRules
2018-04-12 17:36:24 +02:00
Ruud Kamphuis
66108bec84
Fix missing sprintf
2018-04-05 17:14:28 +02:00
Vladimir Razuvaev
7762430bc3
Merge pull request #256 from camuthig/fix-operation-param-operation-name
...
Parse operation name from operationName instead of operation
2018-03-29 20:25:39 +08:00
Daniel Tschinder
3e067cc60f
Readd type decorator and fix lazy type loading
2018-03-06 12:53:28 +01:00
Chris Muthig
8aa6dc17a5
Parse operation name from operationName instead of operation
2018-03-03 15:41:55 -08:00
Daniel Tschinder
f9a366e69a
Add Fallback for DirectiveLocations
2018-02-16 16:54:06 +01:00
Daniel Tschinder
dc6e814de3
Fix orList to be the same as in JS and follow the chicago style for commas
2018-02-16 16:39:59 +01:00
Daniel Tschinder
d92a2dab21
Add suggestions for invalid values
...
For misspelled enums or field names, these suggestions can be helpful.
This also changes the suggestions algorithm to better detect case-sensitivity mistakes, which are common
ref: graphql/graphql-js#1153
2018-02-16 16:19:25 +01:00
Daniel Tschinder
48c5e64a08
Adding an interface to a type is now a dangerous change.
...
ref: graphql/graphql-js#992
2018-02-16 15:30:27 +01:00
Daniel Tschinder
d71b45d60e
Find breaking directive changes
...
ref: graphql/graphql-js#1152
2018-02-16 00:15:19 +01:00
Daniel Tschinder
ddfeee314c
Fix path argument. Enchance visit test to validate all arguments
...
ref: graphl/graphql-js#1149
2018-02-15 22:44:17 +01:00
Daniel Tschinder
58e0c7a178
Validate literals in a single rule with finer precision
...
This generalizes the "arguments of correct type" and "default values of correct type" to a single rule "values of correct type" which has been re-written to rely on a traversal rather than the utility function `isValidLiteralValue`. To reduce breaking scope, this does not remove that utility even though it's no longer used directly within the library. Since the default values rule included another validation rule that rule was renamed to a more apt "variable default value allowed".
This also includes the original errors from custom scalars in the validation error output, solving the remainder of graphql/graphql-js#821 .
ref: graphql/graphql-js#1144
2018-02-15 21:29:14 +01:00
Daniel Tschinder
17520876d8
Update some validators to latest upstream version
...
This includes:
graphql/graphql-js#1147
graphql/graphql-js#355
This also fixes two bugs in the Schema
- types that were not found where still added to the typeMap
- InputObject args should not be searched for types.
2018-02-15 17:19:53 +01:00
Daniel Tschinder
949b853678
Add experimental support for parsing variable definitions in fragments
...
ref: graphql/graphql-js#1141
2018-02-15 13:37:45 +01:00
Daniel Tschinder
fde7df534d
Robust type info
...
There are possibilities for errors during validation if a schema is not valid when provided to TypeInfo. Most checks for validity existed, but some did not. This asks flow to make those checks required and adds the remaining ones. Important now that we allow construction of invalid schema.
ref: graphql/graphql-js#1143
2018-02-15 12:22:29 +01:00