v6.0.0-beta.2
Pre-release
Pre-release
Changed
- Use the strongest possible native types over PHPDocs
- Use
declare(strict_types=1) - Add validation support to
Paginatorwithresolvermode - Pass resolver arguments to
FieldBuilderDirective::handleFieldBuilder()#2234 - Expected resolver arguments in
ResolveInfo::enhanceBuilder() - Pass the path array to
CacheKeyAndTags::key()#2176 - Require implementations of
BatchedEntityResolverto maintain the keys given inarray $representations#2286 - Require filter directives such as
@whereKeyin@delete,@forceDeleteand@restore#2289 - Subscriptions can now be filtered via
$subscriber->socket_idandrequest()->header('X-Socket-ID')#2298 - Make pagination argument
firstnon-nullable - Calculate complexity for
@paginateaccording to the number of items requested - Require argument
resolverin directive@complexity - Move interface
Nuwave\Lighthouse\Support\Contracts\GlobalIdtoNuwave\Lighthouse\GlobalId\GlobalId - Use union type for
$idargument inNodeDirective - Replace
Arr::first(array_keys())witharray_key_first()inOrderByDirective - Limit constructor argument
$paginationTypeinPaginationTypeto literal constant values - Change visibility of
BaseDirective::directiveHasArgumentfrompublictoprotected - Replace
Illuminate\Database\DatabaseManagerwithIlluminate\Database\ConnectionResolverInterfaceinRelationDirective - Replace
DirectiveLocator::beforeLastwithStr::beforeLast - Default
subscriptions.exclude_emptytotrue - Allow
FieldManipulatorandArgManipulatordirectives on interfaces #1955 - Apply argument transformation only once per field #1706
- Expect
FieldResolver::resolveField()to return resolver function directly #1706 - Simplify
FieldMiddlewaredirective interface #1706 - Rename configuration option
schema.registertoschema_path - Restructure cache related configuration options
- Register all non-user namespaces through
RegisterDirectiveNamespacesevent #2337
Fixed
- Return proper error for unknown types in variable definitions
- Ensure
_entitiesmaintains order of representations in result #2286 - Allow combining
@canwith non-default@guard#2276
Added
- Add method
TypeRegistry::search()that maybe finds a type with a given name - Decode fields with directive
@globalIdin federation model entity resolver - Add
GraphQLContext:: setUser(?Authenticatable $user): void - Add directive
@whereKeyto filter Models by their primary key #2289 - Allow directive
@whereon fields #2306 - Allow passing route parameters in
MakeGraphQLRequeststest methods #2333
Removed
- Remove mixin
TestResponse::assertGraphQLErrorCategory() - Remove class
Nuwave\Lighthouse\Exceptions\GenericException - Remove error extension field
category - Remove interface
Nuwave\Lighthouse\Exceptions\RendersErrorsExtensions - Remove
Nuwave\Lighthouse\Execution\ExtensionErrorHandler - Remove support for PHP 7.2, 7.3, 7.4
- Remove support for Laravel 5, 6, 7, 8
- Remove
Serializableimplementation - Remove trait
ClearsSchemaCache - Remove config option
lighthouse.unbox_bensampo_enum_enum_instances - Remove
ArgumentSet::enhanceBuilder(), useResolveInfo::enhanceBuilder() - Remove the
globalIdargument from@delete,@forceDeleteand@restore#2289 - Remove
MockResolver - Remove deprecated
BatchLoader::forgetInstances()inGraphQL - Remove method check for
Illuminate\Foundation\Exceptions\Handler::renderable - Remove setting
non_null_pagination_resultsand always behave as if it weretrue - Remove
Nuwave\Lighthouse\Subscriptions\Contracts\StoresSubscriptions::subscriberByRequest() - Remove deprecated methods from
FieldValue - Remove deprecated
GraphQL::executeQuery()andGraphQL::prepSchema() - Remove
@fielddirective argumentargs#1706 - Remove schema caching v1 #2321
- Do not register
ScoutServiceProviderby default