Skip to content

latest updates#1

Open
ghost wants to merge 316 commits intoedlouthfrom
master
Open

latest updates#1
ghost wants to merge 316 commits intoedlouthfrom
master

Conversation

@ghost
Copy link

@ghost ghost commented Mar 4, 2021

No description provided.

vladar and others added 30 commits July 1, 2019 13:03
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
Co-Authored-By: Jeremiah VALERIE <mcg-web@users.noreply.github.com>
# Conflicts:
#	src/Executor/ReferenceExecutor.php
Parse partial source by delegating calls to the internal parseX methods of the Parser
Let's a bit wait more for coverage in Scrutinizer
shmax and others added 29 commits August 23, 2020 11:44
* 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
`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>
@ghost ghost force-pushed the master branch from af8e40c to 5663ac3 Compare March 4, 2021 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.