github nuwave/lighthouse v5.0-alpha.1

latest releases: v6.36.2, v6.36.1, v6.36.0...
pre-release3 years ago

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/graphql and application/x-www-form-urlencoded properly #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\ValidationException no longer extends \Illuminate\Validation\ValidationException #1185
  • Move validation related classes into namespace Nuwave\Lighthouse\Validation #1185
  • Run ArgDirectives in distinct phases: Sanitize, Validate, Transform #1185
  • The directive interfaces ArgBuilderDirective, ArgTransformerDirective and ArgDirectiveForArray
    extend Directive instead of ArgDirective #1185
  • Change the autogeneration of the OrderByClause input for @orderBy, the
    argument field is now always called column #1337
  • Names for autogenerated types are now prepended with the name of the fields parent type
    This affects @orderBy, @whereConditions and @whereHasConditions #1337
  • __invoke is now the only supported method name for convention based
    field resolver classes #1422
  • Change \Nuwave\Lighthouse\Support\Contracts\Directive to require all directives to have an SDL
    definition by implementing public static definition(): string #1386
  • Combine Nuwave\Lighthouse\Schema\Factories\DirectiveNamespacer and Nuwave\Lighthouse\Schema\Factories\DirectiveFactory into
    \Lighthouse\Schema\DirectiveLocator #1494
  • Require haydenpierce/class-finder as a built-in dependency #1494
  • Add method defaultHasOperator to \Nuwave\Lighthouse\WhereConditions\Operator #1412
  • Change default configuration options in lighthouse.php:
    • 'guard' => 'api'
    • 'forceFill' => true
  • Use laragraph/laravel-graphql-utils for 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 @method call the underlying method with the arguments as ordered parameters instead
    of the full resolver arguments #1509
  • Change ErrorHandler method handle() to non-static __invoke() and allow discarding
    errors by returning null
  • Allow subscriptions without named operations, base channels on the field name

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\GraphQLValidator as validation now uses Laravel's native validator #1185
  • Remove interfaces HasArgumentPath and HasErrorBuffer and the parts of FieldFactory that calls them #1185
  • Remove the ValidationDirective abstract class in favour of validator classes #1185
  • Remove configuration option lighthouse.orderBy, always uses column now #1337
  • Remove \Nuwave\Lighthouse\Support\Contracts\DefinedDirective interface, moving its
    functionality to \Nuwave\Lighthouse\Support\Contracts\Directive #1386
  • Remove fallback for lighthouse.cache.ttl setting #1423
  • Remove Nuwave\Lighthouse\Schema\AST\PartialParser in favor of GraphQL\Language\Parser #1457
  • Remove Nuwave\Lighthouse\Execution\GraphQLRequest singleton #1424
  • Remove @bcrypt in favor of @hash #1200
  • Remove the @middleware directive, as it violates the boundary between HTTP and GraphQL
    request handling. Use @guard or other field middleware directives instead #1135
  • Remove configuration option pagination_amount_argument, it is always first now

Fixed

  • Prefix complex conditions with table name to avoid ambiguous SQL #1530

Don't miss a new lighthouse release

NewReleases is sending notifications on new releases.