Vladimir Razuvaev
d1d4455eaa
Fixed warning added by one of the previous commits
2019-06-19 15:49:22 +07:00
Vladimir Razuvaev
0a71f9fba9
Merge pull request #496 from simPod/fixes
...
Another code cleanup
2019-06-17 16:48:04 +07:00
Simon Podlipsky
6a5325a448
Another code cleanup
2019-06-12 15:43:17 +02:00
Aurélien David
e87460880c
QueryPlan can now be used on interfaces not only objects.
...
It's often the case to use interfaces in queries:
interface Pet { name: String! }
Query {
pets: [Pet]
}
2019-06-12 11:59:42 +02:00
spawnia
c9faa3489b
Add schema validation: Input Objects must not contain non-nullable circular references
...
Spec change: https://github.com/graphql/graphql-spec/pull/445
Reference implementation: https://github.com/graphql/graphql-js/pull/1359
2019-06-10 22:15:23 +02:00
Simon Podlipsky
06529e1924
Upgrade Doctrine CS
2019-03-28 12:18:35 +01:00
Simon Podlipsky
23ece09407
Upgrade PHPStan
2019-03-18 13:02:58 +01:00
Vladimir Razuvaev
29eba82093
Merge pull request #436 from keulinho/add-queryplan
...
Added query plan
2019-03-09 21:37:44 +07:00
Jonas Elfering
5b3f44c7a3
add queryplan
2019-02-01 22:39:00 +01:00
Jan Bukva
edb5268583
Fix return annotation of resolveType() in InterfaceType
2019-01-28 22:46:20 +01:00
Erik Gaal
9a0dbff26b
Add NullableType interface
2018-12-05 11:43:27 +01:00
Simon Podlipsky
376e927505
Document BC and fix types in ResolveInfo
2018-11-27 14:05:55 +01:00
Vladimir Razuvaev
e1b4d438db
Ability to override internal types ( closes #401 )
2018-11-27 15:39:20 +07:00
Vladimir Razuvaev
7c19777dff
Ensure interface has at least 1 concrete type
2018-11-21 20:11:11 +07:00
Jakub Kulhan
b5d3341995
Pluggable executor implementations; new faster executor using coroutines
2018-11-06 23:32:50 +01:00
Vladimir Razuvaev
23169603fc
Removed old experimental code
2018-11-03 23:25:23 +07:00
Simon Podlipsky
644f97634b
Little fixes
2018-10-22 23:37:28 +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
Torsten Blindert
e7de069bd5
FEATURE: SchemaExtender ( #362 )
...
FEATURE: SchemaExtender (#362 )
2018-10-08 15:55:20 +02:00
Simon Podlipsky
18a5639cb7
Fix CS in src/Type
2018-10-05 10:47:57 +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
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
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
Simon Podlipsky
7dbd72cebf
Check CS in the whole project
...
Closes #284
2018-09-02 16:46:58 +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
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
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
39df711eac
More definition tests (for type validation)
2018-08-07 23:32:26 +07: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
1b22f95a86
Removed previously deprecated classes/methods
2018-05-27 19:13:32 +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
Ruud Kamphuis
66108bec84
Fix missing sprintf
2018-04-05 17:14:28 +02:00
Daniel Tschinder
3e067cc60f
Readd type decorator and fix lazy type loading
2018-03-06 12:53:28 +01:00
Daniel Tschinder
f9a366e69a
Add Fallback for DirectiveLocations
2018-02-16 16:54:06 +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
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
60df83f47e
Preserve original coercion errors, improve error quality.
...
This is a fairly major refactoring of coerceValue which returns an Either so it can return a complete collection of errors. This allows originalError to be preserved for scalar coercion errors and ensures *all* errors are represented in the response.
This had a minor change to the logic in execute / subscribe to allow for buildExecutionContext to abrupt complete with multiple errors.
ref: graphql/graphql-js#1133
2018-02-13 16:51:44 +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
ff63e07b05
Improve introspection types + new getIntrospectionQuery()
...
This adds a new function `getIntrospectionQuery()` which allows for some minor configuration over the resulting query text: to exclude descriptions if your use case does not require them.
ref: graphql/graphql-js#1113
2018-02-11 18:19:52 +01:00