Conversation
Resolve todo in Boolean coercion, add explanation, update test names to match reference implementation
# Conflicts: # docs/data-fetching.md # src/Executor/Executor.php # tests/Executor/DeferredFieldsTest.php
Consistently name the first resolver argument and the root value
Fix ReferenceExecutor
Drop deprecated GraphQL\Schema
Add FieldDefinition return type
Upgrade PHPStan to 0.11.12
Co-Authored-By: Jeremiah VALERIE <mcg-web@users.noreply.github.com>
Fix internal directives
# Conflicts: # src/Executor/ReferenceExecutor.php
Parse partial source by delegating calls to the internal parseX methods of the Parser
PHPStan Level 2
Let's a bit wait more for coverage in Scrutinizer
* Revert "move execution of lazy type to typeloader" This reverts commit 484d2dd. * add instanceof check * pr comment * add comment
…ebonyx#716) * fix default get/set behavior * default behavior for isset
…ected conversion) (webonyx#724) * Fix AST::fromArray conversion of initial values (match initial to expected conversion) - Parse `DirectiveDefinitionNode->locations` as `NodeList<NamedNode>` - Parse `Parser::implementsInterfaces` as `NodeList<NamedTypeNode>` - Update signature of `Parser::unionMemberTypes` to match actual `NodeList<NamedTypeNode>` Fixes webonyx#723 * fix returned type of directiveLocation and directiveLocations
…x#726) - Remove ` = []` from a couple of usages, as this is now considered invalid typing. - Adjust a few boolean validations to explicitly check for ` === null` now (the default when not set during manual construction).
* fix $debug type `$debug` should be `int` in the same way as in definition of the `FormattedError::createFromException()` * fix codeing style
* Enhance type definitions for Executor * Fix code style
* Update Type.php * Fix cs
`Parser::parseOperationDefinition` will create a `OperationDefinitionNode` and propagate the `operation` type it finds. In `::parseExecutableDefinition` the function is called with `query`, `mutation`, or `subscription`. This means `OperationDefinitionNode` can exist where `$operation` is `subscription`. The property type annotation doesn't currently match with this possible behaviour so we should update it :)
`set-env` and `add-path` are disabled in GitHub actions. See https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ This requires an update to the action using those commands. This means at least version 2.6.0 is needed. See shivammathur/setup-php#300 However there seem to be no breaking changes so we can go straight to 2.9.0 instead. This also allows testing with version 8.x of PHP.
Co-authored-by: Fabians <fabians.printful@gmail.com>
* Add comprehensive test for the default resolver * Fix codestyle * fix test name
* Do not add errors key when empty * Rename var, add comment * Use assertSame * Explicit empty array check Co-authored-by: Simon Podlipsky <simon@podlipsky.net> Co-authored-by: Simon Podlipsky <simon@podlipsky.net>
* Allow pushing nodes to NodeList via []= This can come up when manipulating the AST programmatically. When pushing to a `NodeList` using `[]=`, the first argument to `offsetExists` is `null`. Thus, the element is set into the internal array with `(string) null === ""`. Now, additional pushes replace the node at key `""` instead of appending as expected. * explain * static * final * Mention in CHANGELOG.md * Fix CHANGELOG.md
* Implement support for interfaces implementing interfaces Closes webonyx#728 * Implement tests for interfaces implementing interfaces This ports the JavaScript tests for `RFC: Allow interfaces to implement other interfaces` to PHP. This should ensure that there is sufficient test coverage for the changes made to support interfaces implementing interfaces. Tests taken from https://github.com/graphql/graphql-js/pull/2084/files including any typoes in test description strings to aid in comparison. * Fix extend implement interface in Parser This is part of the update to allow interfaces to implement interfaces. A single extend statement to add an implementation of an interface without field declarations is valid. This was caught by tests and brings in a change from graphql/graphql-js#2084 * Validate interface implemented ancestors Part of the work done to implement interfaces implementing interfaces. This was caught by test and improves on the previously done changes for the SchemaValidationContext by implementing `validateTypeImplementsAncestors` which was missing. * Properly apply Schema changes for interface extension support This redoes the work done for the Schema class since it was previously guessed at. It now more closely follows graphql/graphql-js/pull/2084 * Improve interface extension related typehints Co-authored-by: Benedikt Franke <benedikt@franke.tech> * Refine types * Remove complex array shape type * Don't remove but deprecate DANGEROUS_CHANGE_IMPLEMENTED_INTERFACE_ADDED Removing a public constant is a breaking change and can not be implemented in a minor version. Instead the internal value is changed to ensure that existing code keeps working with the new interface implementation logic. * Don't remove but deprecate BREAKING_CHANGE_INTERFACE_REMOVED_FROM_OBJECT Co-authored-by: Benedikt Franke <benedikt@franke.tech> Co-authored-by: Benedikt Franke <benedikt.franke@mll.com>
* Reify AST node types and remove unneeded nullability This achieves a few things: - make the code easier to understand both by humans and static analyzers - improve performance by eliminating unnecessary null checks - improve usability through a clarified API * fix codestyle * fix EnumTypeExtensionNode.php * Update src/Utils/ASTDefinitionBuilder.php Co-authored-by: Simon Podlipsky <simon@podlipsky.net> * Update ASTDefinitionBuilder.php * Update src/Utils/ASTDefinitionBuilder.php * Fix intersection type sniffer * Fix interfaces property Co-authored-by: Simon Podlipsky <simon@podlipsky.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.