github nuwave/lighthouse v6.0.0

latest releases: v6.45.0, v6.44.2, v6.44.1...
19 months ago

Changed

  • Use the strongest possible native types over PHPDocs
  • Use declare(strict_types=1)
  • Add validation support to Paginator with resolver 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 in array $representations #2286
  • Require filter directives such as @whereKey in @delete, @forceDelete and @restore #2289
  • Subscriptions can now be filtered via $subscriber->socket_id and request()->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 to Nuwave\Lighthouse\GlobalId\GlobalId
  • Use union type for $id argument in NodeDirective
  • Replace Arr::first(array_keys()) with array_key_first() in OrderByDirective
  • Limit constructor argument $paginationType in PaginationType to literal constant values
  • Change visibility of BaseDirective::directiveHasArgument from public to protected
  • Replace Illuminate\Database\DatabaseManager with Illuminate\Database\ConnectionResolverInterface in RelationDirective
  • Replace DirectiveLocator::beforeLast with Str::beforeLast
  • Default subscriptions.exclude_empty to true
  • Allow FieldManipulator and ArgManipulator 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 to schema_path
  • Restructure cache related configuration options
  • Register all non-user namespaces through RegisterDirectiveNamespaces event #2337
  • Guard default configuration options in lighthouse.php allows multiple guards #2345
  • Make @auth and @whereAuth support multiple guards #2345
  • Make Illuminate\Http\Request optional in Nuwave\Lighthouse\Support\Contracts\GraphQLContext #2353
  • Move namespace Nuwave\Lighthouse\Support\Http to Nuwave\Lighthouse\Http #2358

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
  • Fix error message when failing to find class in namespace #2342
  • Prevent regression to simple paginator type on fields using @cache directive #2354

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
  • Add subscription assertion methods in MakesGraphQLRequests and TestResponseMixin and docs in phpunit integration section #2343
  • Allow laragraph/utils:^2 #2356
  • Add directives @whereNull and @whereNotNull #2357
  • Add configurable namespace to allow custom non-root type field resolvers without FQN #2351

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(), use ResolveInfo::enhanceBuilder()
  • Remove the globalId argument from @delete, @forceDelete and @restore #2289
  • Remove MockResolver
  • Remove deprecated BatchLoader::forgetInstances() in GraphQL
  • Remove method check for Illuminate\Foundation\Exceptions\Handler::renderable
  • Remove setting non_null_pagination_results and always behave as if it were true
  • Remove Nuwave\Lighthouse\Subscriptions\Contracts\StoresSubscriptions::subscriberByRequest()
  • Remove deprecated methods from FieldValue
  • Remove deprecated GraphQL::executeQuery() and GraphQL::prepSchema()
  • Remove @field directive argument args #1706
  • Remove schema caching v1 #2321
  • Do not register ScoutServiceProvider by default
  • Remove alias/Facade graphql
  • Remove subscriptions version 1
  • Remove MiddlewareAdapter #2358

Don't miss a new lighthouse release

NewReleases is sending notifications on new releases.