Skip to content

Releases: rebing/graphql-laravel

GraphQL Laravel 2.1.1 released

04 Sep 09:28
@mfn mfn
eed0f9e
Compare
Choose a tag to compare

Full ChangeLog for 2.1.1

This release allows it to be installed with Laravel 6.0

GraphQL Laravel 2.1.0 released

27 Aug 19:36
@mfn mfn
73ddd5e
Compare
Choose a tag to compare

Full ChangeLog for 2.1.0

Added

  • The custom 'query' now receives the GraphQL context as the 3rd arg (same as any resolver) #464 / mfn
  • Allow to load deeper nested queries by allowing to change the depth when calling $getSelectFields(int $depth) #472 / mfn

As always, we would like to thank all the contributors that opened issues, created pull requests or updated the documentation!

GraphQL Laravel 2.0.1 released

18 Aug 20:45
@mfn mfn
3901a7e
Compare
Choose a tag to compare

A small patch release after the recent major 2.* release, expected to be fully compatible.

If you are new to the 2.* release, please see our Upgrade Guide from v1 to 2.*

Full ChangeLog for 2.0.1

Added

Changed

Fixed

  • Support adding Schema objects directly #449 / mfn
  • Input arguments are properly parsed when objects or lists are passed #419 / sowork

As always, we would like to thank all the contributors that opened issues, created pull requests or updated the documentation!

GraphQL Laravel 2.0.0 released

05 Aug 15:46
@mfn mfn
34492b7
Compare
Choose a tag to compare

This is a new major release including breaking changes, bug fixes, performance improvements and better test coverage.

See our Upgrade Guide from v1 to 2.* for things to watch out

Except for the updates to readme/changelog, this release is identical with https://github.com/rebing/graphql-laravel/releases/tag/v2.0.0-RC5

Full ChangeLog for 2.0.0

Breaking changes

  • The UploadType now has to be added manually to the types in your schema if you want to use it
    • The ::getInstance() method is gone
  • The order and arguments/types for resolvers has changed:
    • before: resolve($root, $array, SelectFields $selectFields, ResolveInfo $info)
    • after: resolve($root, $array, $context, ResolveInfo $info, Closure $getSelectFields)
  • Added PHP types / phpdoc to all methods / properties #331
    • Changes in method signatures will require small adaptions.
  • Validation errors are moved from error.validation to error.extensions.validation as per GraphQL spec recommendation #294
  • SelectFields on interface types now only selects specific fields instead of all #294
    • Although this could be consider a bug fix, it changes what columns are selected and if your code as a side-effect dependent on all columns being selected, it will break

Added

  • Added support for lazy loading types (config lazyload_types), improve performance on large type systems #405 but doens't work together with type aliases or paginate().
  • A migration guide for the Folklore library as part of the readme
  • New make:graphql:input command
  • New make:graphql:union command
  • New make:graphql:interface command
  • New make:graphql:field command
  • New make:graphql:enum command and dedicated EnumType, deprecating $enumObject=true in the Type class
  • New make:graphql:scalar command and add more information regarding scalars to the readme
  • TypeConvertible interface requiring to implement toType(): \GraphQL\Type\Definition\Type
    Existing types are not affected because they already made use of the same method/signature, but custom Scalar GraphQL types work differently and benefit from the interface
  • alias is now also supported for relationships #367
  • InputType support class which eventually replace $inputObject=true #363
  • Support DB::raw() in alias fields
  • GraphiQL: use regenerated CSRF from server if present #332
  • Internal
    • Added declare(strict_types=1) directive to all files
    • Test suite has been refactored and now features Database (SQLite) tests too

Changed

  • Types and Schemas are now only booted when the graphql service is requested, improving performance when having this library installed but not using it in certain workloads (pure artisan commands, non-GraphQL web requests, etc.) #427
  • Follow Laravel convention and use plural for namspaces (e.g. new queries are placed in App\GraphQL\Queries, not App\GraphQL\Query anymore); make commands have been adjusted
  • Made the following classes abstract: Support\Field, Support\InterfaceType, Support\Mutation, Support\Query, Support\Type, Support\UnionType #357
  • Updated GraphiQL to 0.13.0 #335
    • If you're using CSP, be sure to allow cdn.jsdelivr.net and cdnjs.cloudflare.com
  • ValidatorError: remove setter and make it a constructor arg, add getter and rely on contracts
  • Replace global helper is_lumen with static class call \Rebing\GraphQL\Helpers::isLumen

Fixed

  • The Paginator correctly inherits the types model so it can be used with SelectFields and still generates correct SQL queries #415
  • Arguments are now validated before they're passed to authorize() #413
  • File uploads now correctly work with batched requests #397
  • Path multi-level support for Schemas works again #358
  • SelectFields correctly passes field arguments to the custom query #327
    • This also applies to privacy checks on fields, the callback now receives the field arguments too
    • Previously the initial query arguments would be used everywhere

Removed

  • Removed \Fluent dependency on \Rebing\GraphQL\Support\Field #431
  • Removed \Fluent dependency on \Rebing\GraphQL\Support\Type #389
  • Unused static field \Rebing\GraphQL\Support\Type::$instances
  • Unused field \Rebing\GraphQL\Support\Type::$unionType

Contributors to 2.0.0

Thank you to all the contributors that helped make this release happen:

  • Kyle
  • sowork
  • Viktor Szépe
  • Christian
  • Zaid J. Barghouthi
  • Андреев Павел
  • Edwin Dayot

As always, we would like to thank all the contributors that opened issues, created pull requests or updated the documentation.

v2.0.0-RC5

28 Jul 19:12
@mfn mfn
e43e245
Compare
Choose a tag to compare
v2.0.0-RC5 Pre-release
Pre-release

The release cycle is noticeable slowing down, indicating that the next major release will be there soon!

  • There's now an upgrade guide from v1 to v2.
  • We tried to enable lazyload_types by default, but depending on how the library used, this may create a negative DX as not all cases can be supported so we decided not to do it for now.

Changes since the last Release Candidate

Changed

  • Types and Schemas are now only booted when the graphql service is requested, improving performance when having this library installed but not using it in certain workloads (pure artisan commands, non-GraphQL web requests, etc.) #427

Fixed

  • The Paginator correctly inherits the types model so it can be used with SelectFields and still generates correct SQL queries #415

Removed

  • Removed \Fluent dependency on \Rebing\GraphQL\Support\Field #431

Please report and issues you find or hop on slack and give us feedback!

Full Changelog since the latest v1 release

This covers the changes since the last stable release of the v1 release line, v1.24.0

Breaking changes

  • The UploadType now has to be added manually to the types in your schema if you want to use it
    • The ::getInstance() method is gone
  • The order and arguments/types for resolvers has changed:
    • before: resolve($root, $array, SelectFields $selectFields, ResolveInfo $info)
    • after: resolve($root, $array, $context, ResolveInfo $info, Closure $getSelectFields)
  • Added PHP types / phpdoc to all methods / properties #331
    • Changes in method signatures will require small adaptions.
  • Validation errors are moved from error.validation to error.extensions.validation as per GraphQL spec recommendation #294
  • SelectFields on interface types now only selects specific fields instead of all #294
    • Although this could be consider a bug fix, it changes what columns are selected and if your code as a side-effect dependent on all columns being selected, it will break

Added

  • Added support for lazy loading types (config lazyload_types), improve performance on large type systems #405 but doens't work together with type aliases or paginate().
  • A migration guide for the Folklore library as part of the readme
  • New make:graphql:input command
  • New make:graphql:union command
  • New make:graphql:interface command
  • New make:graphql:field command
  • New make:graphql:enum command and dedicated EnumType, deprecating $enumObject=true in the Type class
  • New make:graphql:scalar command and add more information regarding scalars to the readme
  • TypeConvertible interface requiring to implement toType(): \GraphQL\Type\Definition\Type
    Existing types are not affected because they already made use of the same method/signature, but custom Scalar GraphQL types work differently and benefit from the interface
  • alias is now also supported for relationships #367
  • InputType support class which eventually replace $inputObject=true #363
  • Support DB::raw() in alias fields
  • GraphiQL: use regenerated CSRF from server if present #332
  • Internal
    • Added declare(strict_types=1) directive to all files
    • Test suite has been refactored and now features Database (SQLite) tests too

Changed

  • Types and Schemas are now only booted when the graphql service is requested, improving performance when having this library installed but not using it in certain workloads (pure artisan commands, non-GraphQL web requests, etc.) #427
  • Follow Laravel convention and use plural for namspaces (e.g. new queries are placed in App\GraphQL\Queries, not App\GraphQL\Query anymore); make commands have been adjusted
  • Made the following classes abstract: Support\Field, Support\InterfaceType, Support\Mutation, Support\Query, Support\Type, Support\UnionType #357
  • Updated GraphiQL to 0.13.0 #335
    • If you're using CSP, be sure to allow cdn.jsdelivr.net and cdnjs.cloudflare.com
  • ValidatorError: remove setter and make it a constructor arg, add getter and rely on contracts
  • Replace global helper is_lumen with static class call \Rebing\GraphQL\Helpers::isLumen

Fixed

  • The Paginator correctly inherits the types model so it can be used with SelectFields and still generates correct SQL queries #415
  • Arguments are now validated before they're passed to authorize() #413
  • File uploads now correctly work with batched requests #397
  • Path multi-level support for Schemas works again #358
  • SelectFields correctly passes field arguments to the custom query #327
    • This also applies to privacy checks on fields, the callback now receives the field arguments too
    • Previously the initial query arguments would be used everywhere

Removed

  • Removed \Fluent dependency on \Rebing\GraphQL\Support\Field #431
  • Removed \Fluent dependency on \Rebing\GraphQL\Support\Type #389
  • Unused static field \Rebing\GraphQL\Support\Type::$instances
  • Unused field \Rebing\GraphQL\Support\Type::$unionType

v2.0.0-RC4

19 Jul 23:42
@mfn mfn
2d9ea73
Compare
Choose a tag to compare
v2.0.0-RC4 Pre-release
Pre-release

Thanks to the hard work of @crissi , RC4 gives the power of performance!

Changes since the last Release Candidate

Added

  • Added support for lazy loading types, can improve performance on large type systems #405
    This adds the new lazyload_types config, set it true for better performance but witness you can't use aliasing with it!

Fixed

  • Arguments are now validation before they're passed to authorize() #413

Please report and issues you find or hop on slack and give us feedback!

Full Changelog since the latest v1 release

This covers the changes since the last stable release of the v1 release line, v1.24.0

Breaking changes

  • The order and arguments/types for resolvers has changed:
    • before: resolve($root, $array, SelectFields $selectFields, ResolveInfo $info)
    • after: resolve($root, $array, $context, ResolveInfo $info, Closure $getSelectFields)
  • Added PHP types / phpdoc to all methods / properties #331
    • Changes in method signatures will require small adaptions.
  • Validation errors are moved from error.validation to error.extensions.validation as per GraphQL spec recommendation #294
  • SelectFields on interface types now only selects specific fields instead of all #294
    • Although this could be consider a bug fix, it changes what columns are selected and if your code as a side-effect dependent on all columns being selected, it will break

Added## Breaking changes

  • The UploadType now has to be added manually to the types in your schema if you want to use it
    • The ::getInstance() method is gone
  • The order and arguments/types for resolvers has changed:
    • before: resolve($root, $array, SelectFields $selectFields, ResolveInfo $info)
    • after: resolve($root, $array, $context, ResolveInfo $info, Closure $getSelectFields)
  • Added PHP types / phpdoc to all methods / properties #331
    • Changes in method signatures will require small adaptions.
  • Validation errors are moved from error.validation to error.extensions.validation as per GraphQL spec recommendation #294
  • SelectFields on interface types now only selects specific fields instead of all #294
    • Although this could be consider a bug fix, it changes what columns are selected and if your code as a side-effect dependent on all columns being selected, it will break

Added

  • Added support for lazy loading types, can improve performance on large type systems #405
  • A migration guide for the Folklore library as part of the readme
  • New make:graphql:input command
  • New make:graphql:union command
  • New make:graphql:interface command
  • New make:graphql:field command
  • New make:graphql:enum command and dedicated EnumType, deprecating $enumObject=true in the Type class
  • New make:graphql:scalar command and add more information regarding scalars to the readme
  • TypeConvertible interface requiring to implement toType(): \GraphQL\Type\Definition\Type
    Existing types are not affected because they already made use of the same method/signature, but custom Scalar GraphQL types work differently and benefit from the interface
  • alias is now also supported for relationships #367
  • InputType support class which eventually replace $inputObject=true #363
  • Support DB::raw() in alias fields
  • GraphiQL: use regenerated CSRF from server if present #332
  • Internal
    • Added declare(strict_types=1) directive to all files
    • Test suite has been refactored and now features Database (SQLite) tests too

Changed

  • Follow Laravel convention and use plural for namspaces (e.g. new queries are place in App\GraphQL\Queries, not App\GraphQL\Query anymore); make commands have been adjusted
  • Made the following classes abstract: Support\Field, Support\InterfaceType, Support\Mutation, Support\Query, Support\Type, Support\UnionType #357
  • Updated GraphiQL to 0.13.0 #335
    • If you're using CSP, be sure to allow cdn.jsdelivr.net and cdnjs.cloudflare.com
  • ValidatorError: remove setter and make it a constructor arg, add getter and rely on contracts
  • Replace global helper is_lumen with static class call \Rebing\GraphQL\Helpers::isLumen

Fixed

  • Arguments are now validation before they're passed to authorize() #413
  • File uploads now correctly work with batched requests #397
  • Path multi-level support for Schemas works again #358
  • SelectFields correctly passes field arguments to the custom query #327
    • This also applies to privacy checks on fields, the callback now receives the field arguments too
    • Previously the initial query arguments would be used everywhere

Removed

  • Removed \Fluent dependency on \Rebing\GraphQL\Support\Type
  • Unused static field \Rebing\GraphQL\Support\Type::$instances
  • Unused field \Rebing\GraphQL\Support\Type::$unionType

v2.0.0-RC3

10 Jul 22:40
@mfn mfn
1ec5cfa
Compare
Choose a tag to compare
v2.0.0-RC3 Pre-release
Pre-release

Quick on the heels of RC2, here's the third Release Candidate of the v2 release line!

There was only a minor change since the last release but nevertheless one important to reach people about the possible impact.

Changes since the last Release Candidate

Breaking changes

  • The UploadType now has to be added manually to the types in your schema if you want to use it
    • The ::getInstance() method is gone

Please report and issues you find or hop on slack and give us feedback!

Full Changelog since the latest v1 release

This covers the changes since the last stable release of the v1 release line, v1.24.0

Breaking changes

  • The order and arguments/types for resolvers has changed:
    • before: resolve($root, $array, SelectFields $selectFields, ResolveInfo $info)
    • after: resolve($root, $array, $context, ResolveInfo $info, Closure $getSelectFields)
  • Added PHP types / phpdoc to all methods / properties #331
    • Changes in method signatures will require small adaptions.
  • Validation errors are moved from error.validation to error.extensions.validation as per GraphQL spec recommendation #294
  • SelectFields on interface types now only selects specific fields instead of all #294
    • Although this could be consider a bug fix, it changes what columns are selected and if your code as a side-effect dependent on all columns being selected, it will break

Added

  • A migration guide for the Folklore library as part of the readme
  • New make:graphql:input command
  • New make:graphql:union command
  • New make:graphql:interface command
  • New make:graphql:field command
  • New make:graphql:enum command and dedicated EnumType, deprecating $enumObject=true in the Type class
  • New make:graphql:scalar command and add more information regarding scalars to the readme
  • TypeConvertible interface requiring to implement toType(): \GraphQL\Type\Definition\Type
    Existing types are not affected because they already made use of the same method/signature, but custom Scalar GraphQL types work differently and benefit from the interface
  • alias is now also supported for relationships #367
  • InputType support class which eventually replace $inputObject=true #363
  • Support DB::raw() in alias fields
  • GraphiQL: use regenerated CSRF from server if present #332
  • Internal
    • Added declare(strict_types=1) directive to all files
    • Test suite has been refactored and now features Database (SQLite) tests too

Changed

  • Follow Laravel convention and use plural for namspaces (e.g. new queries are place in App\GraphQL\Queries, not App\GraphQL\Query anymore); make commands have been adjusted
  • Made the following classes abstract: Support\Field, Support\InterfaceType, Support\Mutation, Support\Query, Support\Type, Support\UnionType #357
  • Updated GraphiQL to 0.13.0 #335
    • If you're using CSP, be sure to allow cdn.jsdelivr.net and cdnjs.cloudflare.com
  • ValidatorError: remove setter and make it a constructor arg, add getter and rely on contracts
  • Replace global helper is_lumen with static class call \Rebing\GraphQL\Helpers::isLumen

Fixed

  • File uploads now correctly work with batched requests #397
  • Path multi-level support for Schemas works again #358
  • SelectFields correctly passes field arguments to the custom query #327
    • This also applies to privacy checks on fields, the callback now receives the field arguments too
    • Previously the initial query arguments would be used everywhere

Removed

  • Removed \Fluent dependency on \Rebing\GraphQL\Support\Type
  • Unused static field \Rebing\GraphQL\Support\Type::$instances
  • Unused field \Rebing\GraphQL\Support\Type::$unionType

v2.0.0-RC2

09 Jul 22:53
@mfn mfn
2f69c58
Compare
Choose a tag to compare
v2.0.0-RC2 Pre-release
Pre-release

Welcome to the second Release Candidate for the v2 release line!

There have been 89 commits and changes in 95 files since the last RC (woha!).

There were some fixes not part of any changelog because technically these bugs were never publicly released and only existed between the v1 release and now; they're mostly related to the newly types added which were too restrictive or wrong at times.

Silently the test suite has been increased to cover parts which never had any tests, like for example file uploads.

Changes since the last Release Candidate

Added

  • A migration guide for the Folklore library as part of the readme
  • New make:graphql:input command
  • New make:graphql:union command
  • New make:graphql:interface command
  • New make:graphql:field command
  • New make:graphql:enum command and dedicated EnumType, deprecating $enumObject=true in the Type class
  • New make:graphql:scalar command and add more information regarding scalars to the readme
  • TypeConvertible interface requiring to implement toType(): \GraphQL\Type\Definition\Type
    Existing types are not affected because they already made use of the same method/signature, but custom Scalar GraphQL types work differently and benefit from the interface
  • alias is now also supported for relationships #367

Changed

  • Follow Laravel convention and use plural for namspaces (e.g. new queries are place in App\GraphQL\Queries, not App\GraphQL\Query anymore); make commands have been adjusted

Fixed

  • File uploads now correctly work with batched requests #397

Removed

  • Removed \Fluent dependency on \Rebing\GraphQL\Support\Type

Please report and issues you find or hop on slack and give us feedback!

Full Changelog since the latest v1 release

This covers the changes since the last stable release of the v1 release line, v1.24.0

Breaking changes

  • The order and arguments/types for resolvers has changed:
    • before: resolve($root, $array, SelectFields $selectFields, ResolveInfo $info)
    • after: resolve($root, $array, $context, ResolveInfo $info, Closure $getSelectFields)
  • Added PHP types / phpdoc to all methods / properties #331
    • Changes in method signatures will require small adaptions.
  • Validation errors are moved from error.validation to error.extensions.validation as per GraphQL spec recommendation #294
  • SelectFields on interface types now only selects specific fields instead of all #294
    • Although this could be consider a bug fix, it changes what columns are selected and if your code as a side-effect dependent on all columns being selected, it will break

Added

  • A migration guide for the Folklore library as part of the readme
  • New make:graphql:input command
  • New make:graphql:union command
  • New make:graphql:interface command
  • New make:graphql:field command
  • New make:graphql:enum command and dedicated EnumType, deprecating $enumObject=true in the Type class
  • New make:graphql:scalar command and add more information regarding scalars to the readme
  • TypeConvertible interface requiring to implement toType(): \GraphQL\Type\Definition\Type
    Existing types are not affected because they already made use of the same method/signature, but custom Scalar GraphQL types work differently and benefit from the interface
  • alias is now also supported for relationships #367
  • InputType support class which eventually replace $inputObject=true #363
  • Support DB::raw() in alias fields
  • GraphiQL: use regenerated CSRF from server if present #332
  • Internal
    • Added declare(strict_types=1) directive to all files
    • Test suite has been refactored and now features Database (SQLite) tests too

Changed

  • Follow Laravel convention and use plural for namspaces (e.g. new queries are place in App\GraphQL\Queries, not App\GraphQL\Query anymore); make commands have been adjusted
  • Made the following classes abstract: Support\Field, Support\InterfaceType, Support\Mutation, Support\Query, Support\Type, Support\UnionType #357
  • Updated GraphiQL to 0.13.0 #335
    • If you're using CSP, be sure to allow cdn.jsdelivr.net and cdnjs.cloudflare.com
  • ValidatorError: remove setter and make it a constructor arg, add getter and rely on contracts
  • Replace global helper is_lumen with static class call \Rebing\GraphQL\Helpers::isLumen

Fixed

  • File uploads now correctly work with batched requests #397
  • Path multi-level support for Schemas works again #358
  • SelectFields correctly passes field arguments to the custom query #327
    • This also applies to privacy checks on fields, the callback now receives the field arguments too
    • Previously the initial query arguments would be used everywhere

Removed

  • Removed \Fluent dependency on \Rebing\GraphQL\Support\Type
  • Unused static field \Rebing\GraphQL\Support\Type::$instances
  • Unused field \Rebing\GraphQL\Support\Type::$unionType

v.2.0.0-RC1

28 Jun 18:28
@mfn mfn
86e42b9
Compare
Choose a tag to compare
v.2.0.0-RC1 Pre-release
Pre-release

Welcome to the first Release Candidate for the v2 release line!

This is the first RC to signal the community about the ongoing work and to gather feedback:

  • The majority of the work happened under the hood (more strict types, increased integration test coverage)
  • A few bug fix goodies are also included
  • Better compatibility when migrating from https://github.com/folkloreinc/laravel-graphql
    • Please also see this WiP guide: #364

Please report and issues you find or hop on slack and give us feedback!

Changelog

This covers the changes since the last stable release of the v1 release line, v1.24.0

Breaking changes

  • The order and arguments/types for resolvers has changed:
    • before: resolve($root, $array, SelectFields $selectFields, ResolveInfo $info)
    • after: resolve($root, $array, $context, ResolveInfo $info, Closure $getSelectFields)
  • Added PHP types / phpdoc to all methods / properties #331
    • Changes in method signatures will require small adaptions.
  • Validation errors are moved from error.validation to error.extensions.validation as per GraphQL spec recommendation #294
  • SelectFields on interface types now only selects specific fields instead of all #294
    • Although this could be consider a bug fix, it changes what columns are selected and if your code as a side-effect dependent on all columns being selected, it will break

Added

  • InputType support class which eventually replace $inputObject=true #363
  • Support DB::raw() in alias fields
  • GraphiQL: use regenerated CSRF from server if present #332
  • Internal
    • Added declare(strict_types=1) directive to all files
    • Test suite has been refactored and now features Database (SQLite) tests too

Changed

  • Made the following classes abstract: Support\Field, Support\InterfceType, Support\Mutation, Support\Query, Support\Type, Support\UnionType #357
  • Updated GraphiQL to 0.13.0 #335
    • If you're using CSP, be sure to allow cdn.jsdelivr.net and cdnjs.cloudflare.com
  • ValidatorError: remove setter and make it a constructor arg, add getter and rely on contracts
  • Replace global helper is_lumen with static class call \Rebing\GraphQL\Helpers::isLumen

Fixed

  • Path multi-level support for Schemas works again #358
  • SelectFields correctly passes field arguments to the custom query #327
    • This also applies to privacy checks on fields, the callback now receives the field arguments too
    • Previously the initial query arguments would be used everywhere

Removed

  • Unused static field \Rebing\GraphQL\Support\Type::$instances
  • Unused field \Rebing\GraphQL\Support\Type::$unionType

v1.24.0

25 Jun 06:12
@mfn mfn
8ea1b79
Compare
Choose a tag to compare

Changed

  • Prefix named GraphiQL routes with graphql. for compatibility with Folklore #360