v5.0-beta.1
Pre-release
Pre-release
Added
- Apply validation rules to input types by providing a validator class #1185
- Include schema directives when running
php artisan lighthouse:validate-schema#1494 - Add ability to query for the existence of relations in where conditions #1412
- Handle content types
application/graphqlandapplication/x-www-form-urlencodedproperly #1424 - Mark directives that can be used more than once per location as
repeatable#1529 - Allow configuring global field middleware directives in
config/lighthouse.php#1533
Changed
\Nuwave\Lighthouse\Exceptions\ValidationExceptionno longer extends\Illuminate\Validation\ValidationException#1185- Move validation related classes into namespace
Nuwave\Lighthouse\Validation#1185 - Run
ArgDirectivesin distinct phases: Sanitize, Validate, Transform #1185 - The directive interfaces
ArgBuilderDirective,ArgTransformerDirectiveandArgDirectiveForArray
extendDirectiveinstead ofArgDirective#1185 - Change the autogeneration of the
OrderByClauseinput for@orderBy, the
argumentfieldis now always calledcolumn#1337 - Names for autogenerated types are now prepended with the name of the fields parent type
This affects@orderBy,@whereConditionsand@whereHasConditions#1337 __invokeis now the only supported method name for convention based
field resolver classes #1422- Change
\Nuwave\Lighthouse\Support\Contracts\Directiveto require all directives to have an SDL
definition by implementingpublic static definition(): string#1386 - Combine
Nuwave\Lighthouse\Schema\Factories\DirectiveNamespacerandNuwave\Lighthouse\Schema\Factories\DirectiveFactoryinto
\Lighthouse\Schema\DirectiveLocator#1494 - Require
haydenpierce/class-finderas a built-in dependency #1494 - Add method
defaultHasOperatorto\Nuwave\Lighthouse\WhereConditions\Operator#1412 - Change default configuration options in
lighthouse.php:'guard' => 'api''forceFill' => true
- Use
laragraph/laravel-graphql-utilsfor parsing HTTP requests #1424 - Replace the subscription broadcast queued event handler with a queued job to allow the queue name to be specified #1507
- Make
@methodcall the underlying method with the arguments as ordered parameters instead
of the full resolver arguments #1509 - Change
ErrorHandlermethodhandle()to non-static__invoke()and allow discarding
errors by returningnull - Allow subscriptions without named operations, base channels on the field name
- Set
lighthouse.debugconfig through envLIGHTHOUSE_DEBUG#1592 - Test helper
multipartGraphQLnow accepts arrays instead of JSON strings #1615 - Use DateTime::ATOM for DateTimeTZ ISO 8601 compatibility #1622
Removed
- Remove support for PHP 7.1, Laravel 5.5 and PHPUnit 6 #1192
- Remove
TestResponse::jsonGet()helper, use->json()instead https://github.com/nuwave/lighthouse/pull/1192/files - Remove
\Nuwave\Lighthouse\Execution\GraphQLValidatoras validation now uses Laravel's native validator #1185 - Remove interfaces
HasArgumentPathandHasErrorBufferand the parts ofFieldFactorythat calls them #1185 - Remove the
ValidationDirectiveabstract class in favour of validator classes #1185 - Remove configuration option
lighthouse.orderBy, always usescolumnnow #1337 - Remove
\Nuwave\Lighthouse\Support\Contracts\DefinedDirectiveinterface, moving its
functionality to\Nuwave\Lighthouse\Support\Contracts\Directive#1386 - Remove fallback for
lighthouse.cache.ttlsetting #1423 - Remove
Nuwave\Lighthouse\Schema\AST\PartialParserin favor ofGraphQL\Language\Parser#1457 - Remove
Nuwave\Lighthouse\Execution\GraphQLRequestsingleton #1424 - Remove
@bcryptin favor of@hash#1200 - Remove the
@middlewaredirective, as it violates the boundary between HTTP and GraphQL
request handling. Use@guardor other field middleware directives instead #1135 - Remove configuration option
pagination_amount_argument, it is alwaysfirstnow
Fixed
- Prefix complex conditions with table name to avoid ambiguous SQL #1530