Skip to content

Releases: nuwave/lighthouse

v6.4.0

29 Mar 09:19
e7dc03a
Compare
Choose a tag to compare

Added

  • Allow customizing query complexity calculation of @paginate with argument complexityResolver #2372

v6.3.1

24 Mar 16:50
Compare
Choose a tag to compare

Fixed

  • Leverage relations for resolving composite object @key in default model entity resolver for federation

v6.3.0

24 Mar 16:36
90baf3d
Compare
Choose a tag to compare

Added

  • Hydrate external fields for models resolved from representations in federation #2366

v6.2.1

24 Mar 15:37
9bb6d87
Compare
Choose a tag to compare

Fixed

  • Fixed resolving composite object @key in default model entity resolver for federation

v6.2.0

24 Mar 13:45
a945359
Compare
Choose a tag to compare

Changed

  • Automatically set up test traits RefreshSchemaCache and TestsSubscriptions

v6.1.0

23 Mar 18:14
6a4bb18
Compare
Choose a tag to compare

Added

  • Add option --omit-built-in to lighthouse:ide-helper to avoid duplicate built-in definitions #2362

v6.0.0

22 Mar 12:56
Compare
Choose a tag to compare

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

v6.0.0-beta.4

14 Mar 13:41
Compare
Choose a tag to compare
v6.0.0-beta.4 Pre-release
Pre-release

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

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

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

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

v6.0.0-beta.3

10 Mar 09:16
Compare
Choose a tag to compare
v6.0.0-beta.3 Pre-release
Pre-release

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

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(), 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
  • Removed alias/Facade graphql

v6.0.0-beta.2

07 Mar 09:56
e1a4468
Compare
Choose a tag to compare
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 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

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(), 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