All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
You can find and compare releases at the GitHub release page.
- Allow using the
@builder
directive on fields nuwave#1687 - Add dedicated
\Nuwave\Lighthouse\Scout\ScoutBuilderDirective
nuwave#1691 - Allow
@eq
directive on fields nuwave#1681
- Clarify semantics of combining
@search
with other directives nuwave#1691 - Move Scout related classes into
\Nuwave\Lighthouse\Scout
nuwave#1698 BaseDirective
loads all arguments and caches them after the firstdirectiveHasArgument
/directiveArgValue
call nuwave#1707- Use gate response in authorization errors of
@can
directive nuwave#1715
- Fix nested
OR
conditions inHAS
relations nuwave#1713
- Specify
@guard(with: "api")
should be changed to@guard(with: ["api"])
nuwave#1705
- Allow spec-compliant definition of the
messages
argument on@rules
and@rulesForArray
nuwave#1662 - Validate correct usage of
@rules
and@rulesForArray
nuwave#1662 - Allow eager-loading multiple relations on a single field using
@with
nuwave#1528 - Add
\Nuwave\Lighthouse\Execution\DataLoader\BatchLoaderRegistry
to instantiate arbitrary batch loaders nuwave#1528 - Add
@limit
directive to allow clients to specify the maximum number of results to return nuwave#1674 - Predefine default field ordering by using
@orderBy
on fields nuwave#1678 - Add
@like
directive to use a client given value to add aLIKE
conditional to a database query nuwave#1644
- Improve batch loading performance nuwave#1528
- Require
webonyx/graphql-php
version^14.5
- Deprecate the
globalId
argument on the@delete
,@forceDelete
and@restore
directives nuwave#1660 - Deprecate passing the
messages
argument on@rules
and@rulesForArray
as a map with arbitrary keys nuwave#1662 - Deprecate
\Nuwave\Lighthouse\Execution\DataLoader\BatchLoader
in favour of\Nuwave\Lighthouse\Execution\DataLoader\BatchLoaderRegistry
nuwave#1528
- Remove non-functional
globalId
argument definition from@update
nuwave#1660 - Resolve field middleware directives in lexical order nuwave#1666
- Ensure
Carbon\Carbon
is cast toIlluminate\Support\Carbon
in date scalars nuwave#1672 - Fix Laravel 5.6 compatibility for
@withCount
and paginated relationship directives nuwave#1528 - Fix issue where argument names where used instead of variable names in subscription queries nuwave#1683
- Fix issue with TTL breaking subscriptions nuwave#1685
- Make
@node
force load the type if it has not been loaded nuwave#1659
- Make
@model
not extend@node
accidentally
- Deprecate
\Nuwave\Lighthouse\Subscriptions\Subscriber::setRoot()
in favour of property access
- Apply validation rules to input types by providing a validator class nuwave#1185
- Include schema directives when running
php artisan lighthouse:validate-schema
nuwave#1494 - Add ability to query for the existence of relations in where conditions nuwave#1412
- Handle content types
application/graphql
andapplication/x-www-form-urlencoded
properly nuwave#1424 - Mark directives that can be used more than once per location as
repeatable
nuwave#1529 - Allow configuring global field middleware directives in
config/lighthouse.php
nuwave#1533 - Add custom attributes to validations nuwave#1628
- Add new directive interface
FieldBuilderDirective
nuwave#1636 - Add
@whereAuth
directive for filtering a field based on authenticated user nuwave#1636 - Use the
@trim
directive on fields to sanitize all input strings nuwave#1641 - Add Laravel Echo compatible subscription broadcaster nuwave#1370
- Allow auxiliary types in directive definitions nuwave#1649
- Use
Illuminate\Support\Carbon
instead ofCarbon\Carbon
\Nuwave\Lighthouse\Exceptions\ValidationException
no longer extends\Illuminate\Validation\ValidationException
nuwave#1185- Move validation related classes into namespace
Nuwave\Lighthouse\Validation
nuwave#1185 - Run
ArgDirectives
in distinct phases: Sanitize, Validate, Transform nuwave#1185 - The directive interfaces
ArgBuilderDirective
,ArgTransformerDirective
andArgDirectiveForArray
extendDirective
instead ofArgDirective
nuwave#1185 - Change the autogeneration of the
OrderByClause
input for@orderBy
, the argumentfield
is now always calledcolumn
nuwave#1337 - Names for autogenerated types are now prepended with the name of the fields parent type
This affects
@orderBy
,@whereConditions
and@whereHasConditions
nuwave#1337 __invoke
is now the only supported method name for convention based field resolver classes nuwave#1422- Change
\Nuwave\Lighthouse\Support\Contracts\Directive
to require all directives to have an SDL definition by implementingpublic static definition(): string
nuwave#1386 - Combine
Nuwave\Lighthouse\Schema\Factories\DirectiveNamespacer
andNuwave\Lighthouse\Schema\Factories\DirectiveFactory
into\Lighthouse\Schema\DirectiveLocator
nuwave#1494 - Require
haydenpierce/class-finder
as a built-in dependency nuwave#1494 - Add method
defaultHasOperator
to\Nuwave\Lighthouse\WhereConditions\Operator
nuwave#1412 - Change default configuration options in
lighthouse.php
:'guard' => 'api'
'forceFill' => true
- Use
laragraph/utils
for parsing HTTP requests nuwave#1424 - Replace the subscription broadcast queued event handler with a queued job to allow the queue name to be specified nuwave#1507
- Make
@method
call the underlying method with the arguments as ordered parameters instead of the full resolver arguments nuwave#1509 - Change
ErrorHandler
methodhandle()
to non-static__invoke()
and allow discarding errors by returningnull
- Allow subscriptions without named operations, base channels on the field name
- Set
lighthouse.debug
config through envLIGHTHOUSE_DEBUG
nuwave#1592 - Test helper
multipartGraphQL
now accepts arrays instead of JSON strings nuwave#1615 - Use
DateTime::ATOM
for DateTimeTZ ISO 8601 compatibility nuwave#1622 - Split
ProvidesRules
interface intoArgumentValidation
andArgumentSetValidation
nuwave#1628 - Update to PHP 8 compatible mll-lab/graphql-php-scalars 4 nuwave#1639
- Add
TrimDirective
to the defaultfield_middleware
config inlighthouse.php
nuwave#1641 - Field keys in validation errors now match the client given input, ignoring transformations such as
@spread
nuwave#1631
- Remove support for PHP 7.1, Laravel 5.5 and PHPUnit 6 nuwave#1192
- Remove
TestResponse::jsonGet()
helper, use->json()
instead https://github.com/nuwave/lighthouse/pull/1192/files - Remove
\Nuwave\Lighthouse\Execution\GraphQLValidator
as validation now uses Laravel's native validator nuwave#1185 - Remove interfaces
HasArgumentPath
andHasErrorBuffer
and the parts ofFieldFactory
that calls them nuwave#1185 - Remove the
ValidationDirective
abstract class in favour of validator classes nuwave#1185 - Remove configuration option
lighthouse.orderBy
, always usescolumn
now nuwave#1337 - Remove
\Nuwave\Lighthouse\Support\Contracts\DefinedDirective
interface, moving its functionality to\Nuwave\Lighthouse\Support\Contracts\Directive
nuwave#1386 - Remove fallback for
lighthouse.cache.ttl
setting nuwave#1423 - Remove
Nuwave\Lighthouse\Schema\AST\PartialParser
in favor ofGraphQL\Language\Parser
nuwave#1457 - Remove
Nuwave\Lighthouse\Execution\GraphQLRequest
singleton nuwave#1424 - Remove
@bcrypt
in favor of@hash
nuwave#1200 - Remove the
@middleware
directive, as it violates the boundary between HTTP and GraphQL request handling. Use@guard
or other field middleware directives instead nuwave#1135 - Remove configuration option
pagination_amount_argument
, it is alwaysfirst
now
- Prefix complex conditions with table name to avoid ambiguous SQL nuwave#1530
- Merge type interfaces when extending type nuwave#1635
- Deprecate values for the
type
argument of@paginate
that are notPAGINATOR
orCONNECTION
- Add
@morphToMany
directive nuwave#1604
- Support Laravel 8 nuwave#1549 and nuwave#1578
- Fix the type hint in
GraphQLContext::user()
- Provide the definition for
@nest
- Ensure the
@with
directive works properly with polymorphic relations nuwave#1517
- Add artisan command
lighthouse:cache
to compile GraphQL AST nuwave#1451 - Add middleware
\Nuwave\Lighthouse\Support\Http\Middleware\LogGraphQLQueries
that logs every incoming GraphQL query nuwave#1454 - Allow custom query validation rules selection by rebinding the interface
\Nuwave\Lighthouse\Support\Contracts\ProvidesValidationRules
nuwave#1487 - Add
DateTimeUtc
scalar nuwave#1320
- Publish config file with tag
lighthouse-config
and default schema with taglighthouse-schema
instead of the previously used tagsconfig
andschema
nuwave#1489 - Throw partial errors when failing to delete, forceDelete or restore a model nuwave#1420
- Add
\Nuwave\Lighthouse\Execution\ErrorPool
to allow collection of partial errors nuwave#1420
- Ensure the
@count
directive works properly with polymorphic relations nuwave#1466 - Take route prefix into account in
graphQLEnpointUrl()
test helper nuwave#1439
- Deprecate
\Nuwave\Lighthouse\Execution\ErrorBuffer
in favor of\Nuwave\Lighthouse\Execution\ErrorPool
nuwave#1420
- Add
@withCount
directive to eager load relationship counts on field access nuwave#1390 - Extend
lighthouse:directive
artisan command to allow choosing interfaces nuwave#1251 - Add
lighthouse.cache.store
configuration option to set the cache store to use for schema caching nuwave#1446
- Eager load relationship count in
@count
directive nuwave#1390 - Simplify the default field resolver classes generated by the artisan commands
lighthouse:query
andlighthouse:mutation
, add option--full
to include the seldom needed resolver arguments$context
and$resolveInfo
- Restore application of global scopes in nested relation queries when batching pagination nuwave#1447
- Avoid unnecessarily reloading models with count in nested relation queries nuwave#1447
- Safeguard deletion of
programmatic-types.graphql
inartisan lighthouse:ide-helper
- Write definitions for programmatically registered types to
programmatic-types.graphql
when running thelighthouse:ide-helper
artisan command nuwave#1371
- Fix the error message when using multiple exclusive directives on a single node nuwave#1387
- Allow passing additional headers to
multipartGraphQL
Lumen test helper too nuwave#1395 - Rectify that
@orderBy
,@whereConditions
and@whereHasConditions
only work on field arguments nuwave#1402 - Make mass assignment behavior configurable through
force_fill
option inlighthouse.php
nuwave#1405
\Nuwave\Lighthouse\Support\Contracts\DefinedDirective::definition()
will be moved to\Nuwave\Lighthouse\Support\Contracts\Directive
and replace itsname()
method. This requires all directives to have an SDL definition.
- Pull primary key from arguments in
@update
before force filling them into the Model nuwave#1377
- Allow passing additional headers to
multipartGraphQL
test helper nuwave#1342 - Add empty root types automatically when extending them nuwave#1347
- Configure a default
guard
for all authentication functionality nuwave#1343 - Configure the default amount of items in paginated lists with
pagination.default_count
nuwave#1352 - Add new methods
has()
,overwrite()
andregisterNew()
toTypeRegistry
to control if types should be overwritten when registering duplicates nuwave#1361
- Improve validation error when extending a type that is not defined nuwave#1347
- Use
forceFill()
when mutating models nuwave#1348 - Namespace pagination related configuration in
lighthouse.php
nuwave#1352 - Fix publishing the config when using Lumen nuwave#1355
- The setting
paginate_max_count
will change topagination.max_count
nuwave#1352 - The
registerNew()
method ofTypeRegistry
will be removed in favor ofregister()
, which will change its behavior to throw when registering duplicates nuwave#1361
- Fix nesting OR within AND condition when using
@whereConditions
nuwave#1341
- Throw an exception if the return type declaration class for a relation does not exist nuwave#1338
- Fix converting lists of lists into ArgumentSet nuwave#1335
- Make test request helper PHPDocs more accurate for Laravel 7 nuwave#1336
- Fix creating multiple nested BelongsTo relationships on the same level when previous records with matching attributes exist nuwave#1321
- Add flag
--json
toprint-schema
to output JSON instead of GraphQL SDL nuwave#1268 - Add TTL option for subscriptions storage nuwave#1284
- Provide assertion helpers through
TestResponseMixin
nuwave#1308 - Add scalar
DateTimeTz
nuwave#1311 - Publish
_lighthouse_ide_helper.php
withphp artisan lighthouse:ide-helper
- Fix nested mutations with multiple
belongsTo
relations at the same level nuwave#1285 - Avoid race condition that occurs when using
Cache::has()
nuwave#1290 - Replace usage of
resolve()
helper with Lumen-compatibleapp()
nuwave#1305 - Fix using
@create
and@update
on nested input object fields that accept an array of input types
nuwave#1316
- Remove subscriber reference from topic when deleted nuwave#1288
- Improve subscription context serializer nuwave#1283
- Allow replacing the
SubscriptionRegistry
implementation using the container nuwave#1286 - Report errors that are not client-safe through Laravel's
ExceptionHandler
nuwave#1303 - Log in subscribers when broadcasting a subscription update, so that calls to
auth()->user()
return the authenticated user instead ofnull
nuwave#1306 - Replace the subscription broadcast queued event handler with a queued job to allow the queue name to be specified nuwave#1301
- Add
AttemptAuthentication
middleware to optionally log in users and delegate access guards to the field level nuwave#1197 - Add artisan command
lighthouse:directive
to add directive class nuwave#1240
- Eager load nested relations using the
@with
directive nuwave#1068 - Avoid infinite loop with empty namespace in generator commands nuwave#1245
- Automatically register
TestingServiceProvider
for@mock
when running unit tests nuwave#1244
- Ensure subscription routes are named uniquely nuwave#1231
- Throw user readable
Error
instead ofModelNotFoundException
when model is not found in@can
nuwave#1225
- Fix Laravel version detection for Lumen nuwave#1224
- Access nested inputs with dot notation using the
find
option of@can
nuwave#1216 - Add
@hash
directive which uses Laravel's hashing configuration nuwave#1200 - Add option
passOrdered
to@method
to pass just the arguments as ordered parameters nuwave#1208 - Add support to extend
input
,interface
andenum
types nuwave#1203 - Implement
streamGraphQL()
helper in\Nuwave\Lighthouse\Testing\MakesGraphQLRequestsLumen
nuwave#1222 - Support Laravel 7 nuwave#1219
- Remove
@bcrypt
in favor of@hash
nuwave#1200 @method
will call the underlying method with the arguments as ordered parameters instead of the full resolver arguments nuwave#1208
- Add optional
columnsEnum
argument to the@whereConditions
,@whereHasConditions
and@orderBy
directives nuwave#1150 - Exclude or include trashed models in
@can
when@forceDelete
or@restore
are used, the client does not have to filter explicitly nuwave#1157 - Add test trait
\Nuwave\Lighthouse\Testing\MakesGraphQLRequestsLumen
for usage with Lumen nuwave#1100 - Add test trait
\Nuwave\Lighthouse\Testing\UsesTestSchema
to enable using a dummy schema for testing custom Lighthouse extensions nuwave#1171 - Simplify mocking resolvers that just return static data nuwave#1177
- Add utility
\Nuwave\Lighthouse\ClientDirectives\ClientDirective
to correctly get the arguments passed through a client directive nuwave#1184 - Add
streamGraphQL()
helper method to\Nuwave\Lighthouse\Testing\MakesGraphQLRequests
for simple testing of streamed responses, such as@defer
nuwave#1184
- Fix eager-loading relations where the parent type is an
interface
orunion
and may correspond to multiple different models nuwave#1035 - Fix renaming input fields that are nested within lists using
@rename
nuwave#1166 - Fix handling of nested mutation operations that receive
null
nuwave#1174 - Fix nested mutation
upsert
across two levels of BelongsTo relations nuwave#1169 - Apply query filters using an
ArgBuilderDirective
such as@eq
when the argument is nested deeply within the input nuwave#1176 - Fix
\Nuwave\Lighthouse\Testing\MakesGraphQLRequestsLumen
test helper nuwave#1186 - Handle multiple instances of client directives with
@defer
correctly nuwave#1184
- Deprecate
\Nuwave\Lighthouse\Schema\Source\SchemaSourceProvider#setRootPath()
, this function is never called or used anywhere within Lighthouse. It will be removed from the interface.
- Avoid erasing the model information from the wrapping paginated results
type
when defining a paginated@hasMany
field after a field with@paginate
nuwave#1149
- Compose complex input arguments through nested arg resolvers nuwave#899
- Add
\Nuwave\Lighthouse\Support\Contracts\ArgResolver
directive interface nuwave#899 - Allow existing mutation directives
@create
,@update
,@upsert
and@delete
to function as nested arg resolvers nuwave#899 - Validate at schema build time that the
apply
argument@rules
is an array nuwave#1092 - Add support in
@whereConditions
for IN, IS NULL and BETWEEN operators nuwave#1099 - Add ability to define pivot data on nested mutations within
sync
,syncWithoutDetaching
andconnect
nuwave#1110 - Allow restricting the columns for
@orderBy
to a given whitelist and generate anenum
definition for it nuwave#1118 - Allow passing variables in
->graphQL()
test helper nuwave#1127 - Add missing schema descriptions to some inputs, types, and enums nuwave#1131
- Add
@guard
directive to handle authentication nuwave#1135 - Add
@whereHasConditions
directive to filter query results based on the existence of a relationship nuwave#1140
- Remove
\Nuwave\Lighthouse\Execution\MutationExecutor
in favor of modular nested arg resolvers nuwave#899 - Register the operator enum for
@whereConditions
programmatically and allow overwriting it through a service provider nuwave#1099 - Always automatically set the correct argument type when using
@whereConditions
or@orderBy
directives nuwave#1118 - Implement the
name()
function generically in the BaseDirective class nuwave#1098 - Renamed the
@whereConstraints
directive to@whereConditions
nuwave#1140
- Enable chained rule provider directives (
ProvidesRules
) to merge the rules before validating nuwave#1082 - Apply nested
OR
conditions in@whereConditions
correctly nuwave#1099 - Allow passing
null
or simply noid
when using@upsert
nuwave#1114
- The argument
field
within theOrderByClause
used for@orderBy
will be renamed tocolumn
in v5 nuwave#1118 - Deprecated the
@middleware
directive, as it violates the boundary between HTTP and GraphQL request handling. Use@guard
or other field middleware directives instead nuwave#1135
- Remove broken
NOT
conditional when using@whereConditions
nuwave#1125
- Enable multiple queries in a single request by clearing
BatchLoader
instances after executing each query nuwave#1030 - Keep the query and pagination capabilities of relation directives when disabling batch loading nuwave#1083
- Add
INPUT_FIELD_DEFINITION
to allowed locations for the@builder
directive nuwave#1074
- Define
@enum
as a directive class so it shows up inschema-directives.graphql
and can potentially be overwritten nuwave#1078
- Add
syncWithoutDetaching
option for BelongsToMany and MorphToMany relationships nuwave#1031 - Add
injectArgs
option to@can
directive to pass along client defined arguments to the policy check nuwave#1043 - Allow globally turning off relation batch loading through the
config option
batchload_relations
nuwave#1059 - Add
\Nuwave\Lighthouse\Execution\DataLoader\BatchLoader#loadMany()
function nuwave#973 - Extend
@rename
directive to work with arguments and input fields nuwave#521
- Add ability to fetch soft deleted model within
@can
directive to validate permissions using@softDeletes
directive. nuwave#1042 - Improve the error message for missing field resolvers by offering a solution nuwave#1045
- Throw
DefinitionException
when missing a type in the type registry nuwave#1066 - Add
INPUT_FIELD_DEFINITION
toorderBy
directive location nuwave#1069
- Add
@scope
directive for adding a scope to the query builder nuwave#998
- Use detailed
$description
property when generatingenum
values from aBenSampo\Enum\Enum
class nuwave#1027
- Handle arrays of namespaces in generator commands nuwave#1033
- Handle
null
being passed to a nullable argument that is an input object type nuwave#1021
- Fix conversion of client directives after the schema was cached nuwave#1019
- Handle
null
being passed to a nullable argument that is a list of type nuwave#1016
- Add
@upsert
directive and nested mutation operations to create or update a model regardless whether it exists nuwave#1005
- Fix broken behaviour when using union types with schema caching nuwave#1015
- Validate the correctness of the
builder
given to@paginate
at schema build time
- Do not require the type of a field matching a model class when using the
builder
argument of@paginate
nuwave#1011
- Fix regression in 4.4.0 that required matching the type returned from paginated relationship fields with the class name of the model nuwave#1011
- Add
@count
directive for counting a relationship nuwave#984 - Allow overwriting the name of Enum types created through
LaravelEnumType
nuwave#968 - Resolve models through Relay's global identification using
@node
nuwave#974 - Add experimental
@modelClass
directive to map types to models. It will be renamed to@model
in v5 nuwave#974
- Remove the extra new line from the returned value when using
@globalId(decode: "ID")
nuwave#982 - Throw a syntax error instead of an exception when performing an empty request or a request with an empty query nuwave#989
- Properly apply
@spread
when used within a nested input object nuwave#992
- Allow additional route configurations
prefix
anddomain
nuwave#951 - Enable schema cache only when
APP_ENV
!= 'local' nuwave#957
- Fix default model detection when using other directives combination with
@paginate
nuwave#974
- Use the
RegisterDirectiveNamespaces
event instead ofDirectiveFactory#addResolved()
nuwave#950 - Use
@node
instead of@model
to resolve models through Relay's global identification nuwave#974
- Add
@restore
and@forceDelete
directives, similar to@delete
nuwave#941 - Add
@softDeletes
and@trashed
directives to enable filtering soft deleted models nuwave#937
- Prevent throwing in
lighthouse:ide-helper
when no custom directives are defined nuwave#948
- Validate requirements for argument definitions of
@delete
,@forceDelete
and@restore
during schema build time nuwave#941
- Actually use the specified
edgeType
in Relay style connections nuwave#939
- Add
@morphOne
directive for polymorphic one-to-one relationships nuwave#944 - Add
@morphTo
directive for polymorphic one-to-one relationships nuwave#921 - Add
@morphMany
directive for polymorphic one-to-many relationships nuwave#944 - Support Laravel
^6.0
nuwave#926 - Add command
lighthouse:ide-helper
for generating a definition file with all schema directives nuwave#933
- Unbox laravel-enum inputs when using the builder directives nuwave#927
- Add the
@whereJsonContains
directive to an input value as a [whereJsonContains filter - Allow using callable classes with
__invoke
when referencing methods in directives and when looking for default resolvers or type resolvers nuwave#882 - Allow to restrict column names to a well-defined list in
@whereContraints
and generate definitions for anEnum
type and anInput
type that are restricted to the defined columns nuwave#916 - Add test helpers for introspection queries to
MakesGraphQLRequests
nuwave#916
- The default name of resolver and type resolver methods will be
__invoke
in v5 nuwave#882
- Fixed the
ValidationDirective
not setting the mutation or query arguments to itself nuwave#915
- Add the
@namespace
directive as a replacement for the removed@group
directive nuwave#768 - The
@defer
extension now supports deferring nested fields of mutations nuwave#855 - Add a simple way to define complex validation directives by
extending
\Nuwave\Lighthouse\Schema\Directives\ValidationDirective
nuwave#846 - Extend the
@belongsToMany
directive to support pivot data on a custom Relay style Edge type nuwave#871 - Implement
connect
,disconnect
anddelete
operations for nested mutations upon MorphTo relationships nuwave#879
- Avoid growing the memory extensively when doing complex AST manipulation nuwave#768
- Make nested mutations work with subclassed relationship types nuwave#825
- Allow empty arrays and other falsy values as input for nested mutation operations like "sync" nuwave#830
- Use
Illuminate\Contracts\Config\Repository
instead ofIlluminate\Config\Repository
nuwave#832 - Allow checking the abilities with
@can
when issuing mass updates on multiple models nuwave#838 - Allow use of
private
in@cache
directive even when the user is not authenticated nuwave#843 - Fix Lumen route registration nuwave#853
- Fix handling of
@include
directive, it is semantically opposite to@skip
, when using it with@defer
nuwave#855 - Allow querying for null values using
@whereConstraints
nuwave#872 - Fix issue when using the
@model
directive in a type that has a list field nuwave#883 - Make the
@include
and@skip
directives that are part of the GraphQL spec show up in introspection and fix handling of default values in custom client directives nuwave#892
- Bumped the requirement on
webonyx/graphql-php
to^0.13.2
nuwave#768 - Rename directive interfaces dealing with types from
Node*
toType*
nuwave#768 - Change the signature of the AST manipulating directive interfaces:
TypeManipulator
,FieldManipulator
andArgManipulator
nuwave#768 - Change the API of the
DocumentAST
class to enable a more performant implementation nuwave#768 - Enable the schema caching option
lighthouse.cache.enable
by default nuwave#768 - Lazily load types from the schema. Directives defined on parts of the schema that are not used within the current query are no longer run on every request nuwave#768
- Simplify the default route configuration.
Make sure to review your
config/lighthouse.php
and bring it up to date with the latest changes in the base configuration file nuwave#820 - Move
SubscriptionExceptionHandler
into namespaceNuwave\Lighthouse\Subscriptions\Contracts
nuwave#819 - The pagination field argument that controls the amount of results
now default tos
first
instead ofcount
. The configpagination_amount_argument
can be used to change the argument name nuwave#852 - Rename
ArgValidationDirective
toProvidesRules
and dropget
prefix from the methods within nuwave#846 - Make the argument used for finding a model to check
@can
against configurable. The previous behaviour of implicitly using theid
argument for finding a specific model to authorize against now no longer works. nuwave#856 - Change the
Nuwave\Lighthouse\Schema\Types\LaravelEnumType
wrapper to map to Enum instances internally nuwave#908
- Remove
@group
directive in favor of@middleware
and@namespace
nuwave#768 - Remove the
ArgFilterDirective
interface in favor of theArgBuilderDirective
interface nuwave#821 - Remove the old style
@whereBetween
and@whereNotBetween
directives nuwave#821 - Use the
@spread
directive instead of theflatten
argument of@create
/@update
nuwave#822 - Remove
dispatch
aliasesfire
andclass
for dispatching through@event
nuwave#823 - Remove the
GraphQL
facade and the container aliasgraphql
nuwave#824 - Remove the alias
if
for specifying theability
that has to be met in@can
nuwave#838
- The configuration option
pagination_amount_argument
will be removed in v5
- Add compatibility layer to allow
@middleware
to support Lumen nuwave#786 - Add option
decode
to@globaldId
to control the result of decoding nuwave#796 - Add config option
cache.ttl
for customizing expiration time of schema cache nuwave#801 - Extract test helpers into a reusable trait
\Nuwave\Lighthouse\Testing\MakesGraphQLRequests
nuwave#802 - Support custom rule classes in
@rules
and@rulesForArray
nuwave#812
- Fix querying for falsy values through
@whereConstraints
nuwave#800 - Use
Illuminate\Contracts\Events\Dispatcher
instead of concrete implementation in SubscriptionBroadcaster nuwave#805
- The
GraphQL
facade and the container aliasgraphql
will be removed in v4
- Use the spec-compliant default deprecation reason for
@deprecate
directive nuwave#787
- Add
@whereConstraints
directive that offers flexible query capabilities to the client nuwave#753 - Add convenience wrapper for registering Enum types based on [BenSampo/laravel-enum nuwave#779
- The
controller
config option will be removed in v4 nuwave#781
- Respect the model's connection for database transaction during
@create
and@update
nuwave#777
- You can now omit an
input
argument from a query that uses the@spread
directive without getting an error nuwave#774
- The class
SubscriptionExceptionHandler
will be moved to the namespace Nuwave\Lighthouse\Subscriptions\Contracts
- Throw error if pagination amount
<= 0
is requested nuwave#765
- Default the config to always set the
Accept: application/json
header nuwave#743 - Declare a single named route which handles POST/GET instead of 2 separate routes nuwave#738
- Apply the nested operations within a nested mutation in a consistent order that makes sense nuwave#754
- The pagination field argument that controls the amount of results
will default to
first
instead ofcount
in v4. The configpagination_amount_argument
can be used to change the argument name now nuwave#752
- Instantiate the
ErrorBuffer
directly, its dependencies can not be resolved through the container nuwave#756 - Refresh GraphQLRequest singleton between multiple requests to prevent a common error in test execution nuwave#761
- Allow rebinding a custom GlobalId resolver nuwave#739
- Sync existing models in belongsToMany relations using nested mutations when creating nuwave#707
- Add
@spread
directive to reshape nested input arguments nuwave#680 - Add flexible
@builder
directive to quickly specify a single method to apply constraints to the query builder nuwave#680 - Add
new_between_directives
config to use the new between directives now nuwave#680
- Use the
@spread
instead of theflatten
argument of@create
/@update
nuwave#680 - Prefer usage of the
ArgBuilderDirective
instead of theArgFilterDirective
nuwave#680 @whereBetween
and@whereNotBetween
will take a single input object instead of being spread across two args nuwave#680
- Flatten the namespace for the built-in directives nuwave#700
- Sync and connect existing models in morphToMany relations using nested mutations nuwave#707
- Adapt to the new Laravel way and add an alias
dispatch
for the@event
directive nuwave#719
- Aliases
fire
andclass
for dispatching through@event
nuwave#719
- Support Subscriptions nuwave#337
- Support
@defer
client directive nuwave#422 - Define validation for list arguments themselves through
@rulesForArray
nuwave#427 - The
@hasMany
and@paginator
directives now support an additional argumentdefaultCount
that sets a default value for the generated field argumentcount
nuwave#428 - Allow user to be guest when using the
@can
directive nuwave#431 - Add shortcut to get NodeValue type definition fields nuwave#432
- Use
@inject
with dot notation to set nested value nuwave#511 - Populate more relationship types through nested mutations nuwave#514 nuwave#549
- Support the
@deprecated
directive nuwave#522 - Allow defining default namespaces as an array nuwave#525
- Add config & directive argument for
@paginate
to limit the maximum requested count nuwave#569 - Add
guard
argument to@auth
directive nuwave#584 - Support Laravel 5.8 nuwave#626
- Support File Uploads nuwave#628
- Add lifecycle events to hook into the execution nuwave#645
- Add
@orderBy
argument directive for client-side dynamic ordering nuwave#659 - Enable passing in model instance to
@can
directive nuwave#684 - Allow swapping out the default resolver nuwave#690
- Change the default schema location, model and GraphQL namespaces nuwave#423
- Construction and methods of the Field|Node|Arg-Value objects nuwave#425
- The methods called with
@method
now receive the same 4 resolver arguments that all other resolvers do nuwave#486 - Handle mutating directives transactional by default nuwave#512
- Nested mutations for BelongsTo require wrapping the ID in a
connect
argument nuwave#514 nuwave#549 - Make the error messages returned by
@can
more friendly nuwave#515 - Bump requirements for
webonyx/graphql-php
to^0.13
and PHP to>= 7.1
nuwave#517 - Replace
DirectiveRegistry
withDirectiveFactory
to lazy load directives nuwave#520 - Extensions must registered through ServiceProviders instead of the config file nuwave#645
- Increase tracing precision when nanoseconds are available nuwave#674
- Diverging paths of nested input objects can now have distinct validation rules nuwave#427
- Distinguish between FieldDefinitions and InputObjectValues in AST handling nuwave#425
- Set the date in the
Date
scalar to startOfDay, fixes equality checks nuwave#452 - Use primary key defined in model to execute update nuwave#469
- Consider batched queries when using BatchLoader nuwave#508
- Refresh newly created models before returning them nuwave#509
- Prevent name conflict between argument names and non-relation methods when executing nested mutations nuwave#519
- Prevent crash when invalid JSON variables are given nuwave#581
- Handle pagination with Laravel Scout correctly nuwave#661
- Handle schema defined default values for enum types correctly nuwave#689
- Remove the previously broken
@validate
directive in favor of@rules
nuwave#427 - Remove broken user mutations from the default schema nuwave#435
- Remove deprecated methods nuwave#435
- Limit the
@field
directive to using theresolver
argument nuwave#435 - Remove the
@security
directive in favor of defining security options through the config nuwave#435 - Rename the
resolver
argument of@interface
and@union
toresolveType
nuwave#435 - Remove deprecated Traits nuwave#435
- Remove
\Nuwave\Lighthouse\Subscriptions\Contracts\StoresSubscriptions::subscriberByRequest()
We just started maintaining a changelog starting from v3.
If someone wants to make one for previous versions, PR's are welcome.