Changed
- Use the strongest possible native types over PHPDocs
- Use
declare(strict_types=1)
- Add validation support to
Paginator
withresolver
mode - Pass resolver arguments to
FieldBuilderDirective::handleFieldBuilder()
#2234 - Expected resolver arguments in
ResolveInfo::enhanceBuilder()
- Pass the path array to
CacheKeyAndTags::key()
#2176 - Require implementations of
BatchedEntityResolver
to maintain the keys given inarray $representations
#2286 - Require filter directives such as
@whereKey
in@delete
,@forceDelete
and@restore
#2289 - Subscriptions can now be filtered via
$subscriber->socket_id
andrequest()->header('X-Socket-ID')
#2298 - Make pagination argument
first
non-nullable - Calculate complexity for
@paginate
according to the number of items requested - Require argument
resolver
in directive@complexity
- Move interface
Nuwave\Lighthouse\Support\Contracts\GlobalId
toNuwave\Lighthouse\GlobalId\GlobalId
- Use union type for
$id
argument inNodeDirective
- Replace
Arr::first(array_keys())
witharray_key_first()
inOrderByDirective
- Limit constructor argument
$paginationType
inPaginationType
to literal constant values - Change visibility of
BaseDirective::directiveHasArgument
frompublic
toprotected
- Replace
Illuminate\Database\DatabaseManager
withIlluminate\Database\ConnectionResolverInterface
inRelationDirective
- Replace
DirectiveLocator::beforeLast
withStr::beforeLast
- Default
subscriptions.exclude_empty
totrue
- Allow
FieldManipulator
andArgManipulator
directives on interfaces #1955 - Apply argument transformation only once per field #1706
- Expect
FieldResolver::resolveField()
to return resolver function directly #1706 - Simplify
FieldMiddleware
directive interface #1706 - Rename configuration option
schema.register
toschema_path
- Restructure cache related configuration options
Fixed
- Return proper error for unknown types in variable definitions
- Ensure
_entities
maintains order of representations in result #2286 - Allow combining
@can
with non-default@guard
#2276
Added
- Add method
TypeRegistry::search()
that maybe finds a type with a given name - Decode fields with directive
@globalId
in federation model entity resolver - Add
GraphQLContext:: setUser(?Authenticatable $user): void
- Add directive
@whereKey
to filter Models by their primary key #2289 - Allow directive
@where
on fields #2306 - Allow passing route parameters in
MakeGraphQLRequests
test 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
Serializable
implementation - Remove trait
ClearsSchemaCache
- Remove config option
lighthouse.unbox_bensampo_enum_enum_instances
- Remove
ArgumentSet::enhanceBuilder()
, useResolveInfo::enhanceBuilder()
- Remove the
globalId
argument from@delete
,@forceDelete
and@restore
#2289 - Remove
MockResolver
- Remove deprecated
BatchLoader::forgetInstances()
inGraphQL
- Remove method check for
Illuminate\Foundation\Exceptions\Handler::renderable
- Remove setting
non_null_pagination_results
and 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
@field
directive argumentargs
#1706 - Remove schema caching v1 #2321