Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Graphql Laravel Laravel Package

rebing/graphql-laravel

Code-first GraphQL integration for Laravel based on webonyx/graphql-php. Define schemas, types, queries and mutations in PHP. Supports multiple schemas, per-schema middleware, resolver middleware, and n+1 prevention via dataloaders or SelectFields eager loading.

View on GitHub
Deep Wiki
Context7
10.0.0-RC3

New changes in RC3

[!WARNING] Please also read https://github.com/rebing/graphql-laravel/blob/master/UPGRADE.md#upgrading-from-9-to-10

Breaking changes

  • Privacy::validate() and closure signature changed #1251 / mfn new mixed $root first parameter, new optional ?ResolveInfo $resolveInfo fourth parameter, $queryContext now typed as mixed
  • Remove $getSelectFields parameter from Field::authorize() #1250 / mfn it has been non-functional since half a decade

Fixed

  • Fix SelectFields crashing when field types use callable #1252 / mfn
  • Fix APQ middleware race condition (TOCTOU) #1253 / mfn
  • Fix OperationParams not copying originalInput/readOnly, causing TypeError #1254 / mfn
  • Fix APQ config not using config() inside config file #1255 / mfn

Changes in RC2

Breaking changes

  • Privacy::validate() first parameter renamed from $queryArgs to $fieldArgs — it now receives the field's own arguments instead of root query arguments
  • SelectFields now identifies wrapper types via the Rebing\GraphQL\Support\Contracts\WrapType marker interface. Custom pagination types and wrap types used with SelectFields must implement this interface. #1228 / mfn

Added

  • Add tracing support with OpenTelemetry driver #1220 / mfn
  • Rebing\GraphQL\Support\Contracts\WrapType marker interface for wrapper types (pagination types and custom wrap types) #1228 / mfn

Fixed

  • Narrow GraphQL::type() PHPStan return type to (NullableType&Type)|NonNull so consumers can pass it to Type::nonNull() without static analysis errors #1221 / mfn
  • Fix SelectFields forcing select * for Interface return types instead of selecting only the requested columns #683 / mfn
  • Fix SelectFields not calling custom query callbacks on relation fields inside UnionType members #900 / mfn
  • Fix cross-field validation rules (prohibits, required_without, required_if, etc.) not working in nested InputTypes #930 / mfn
  • Fix privacy attribute ignored on nested/sub-types by moving enforcement from SelectFields to field resolvers in Type::getFields() #1161 / mfn
  • Fix SelectFields producing empty SELECT clause for custom wrap types created via GraphQL::wrapType() #1228 / mfn

Changes in RC1

Breaking changes

  • Security hardening: safer defaults for production deployments #1210 / mfn
    • Default HTTP method changed from GET/POST to POST only
    • Batching disabled by default (batching.defaultfalse)
    • Introspection disabled by default (GRAPHQL_DISABLE_INTROSPECTION env var)
    • Default query_max_depth set to 13 (was unlimited)
    • Default query_max_complexity set to 500 (was unlimited)
    • Authorization now runs before validation in field resolver
    • Authorization uses strict === true comparison

Added

- Added `max_batch_size` config option to limit batch query operations

Full Changelog: https://github.com/rebing/graphql-laravel/compare/10.0.0-RC2...10.0.0-RC3

10.0.0-RC2

New changes in RC2

[!WARNING] Please also read https://github.com/rebing/graphql-laravel/blob/master/UPGRADE.md#upgrading-from-9-to-10

Breaking changes

  • Privacy::validate() first parameter renamed from $queryArgs to $fieldArgs — it now receives the field's own arguments instead of root query arguments
  • SelectFields now identifies wrapper types via the Rebing\GraphQL\Support\Contracts\WrapType marker interface. Custom pagination types and wrap types used with SelectFields must implement this interface. #1228 / mfn

Added

  • Add tracing support with OpenTelemetry driver #1220 / mfn
  • Rebing\GraphQL\Support\Contracts\WrapType marker interface for wrapper types (pagination types and custom wrap types) #1228 / mfn

Fixed

  • Narrow GraphQL::type() PHPStan return type to (NullableType&Type)|NonNull so consumers can pass it to Type::nonNull() without static analysis errors #1221 / mfn
  • Fix SelectFields forcing select * for Interface return types instead of selecting only the requested columns #683 / mfn
  • Fix SelectFields not calling custom query callbacks on relation fields inside UnionType members #900 / mfn
  • Fix cross-field validation rules (prohibits, required_without, required_if, etc.) not working in nested InputTypes #930 / mfn
  • Fix privacy attribute ignored on nested/sub-types by moving enforcement from SelectFields to field resolvers in Type::getFields() #1161 / mfn
  • Fix SelectFields producing empty SELECT clause for custom wrap types created via GraphQL::wrapType() #1228 / mfn

Changes from RC1

Breaking changes

  • Security hardening: safer defaults for production deployments #1210 / mfn
    • Default HTTP method changed from GET/POST to POST only
    • Batching disabled by default (batching.defaultfalse)
    • Introspection disabled by default (GRAPHQL_DISABLE_INTROSPECTION env var)
    • Default query_max_depth set to 13 (was unlimited)
    • Default query_max_complexity set to 500 (was unlimited)
    • Authorization now runs before validation in field resolver
    • Authorization uses strict === true comparison

Added

- Added `max_batch_size` config option to limit batch query operations

Full Changelog: https://github.com/rebing/graphql-laravel/compare/10.0.0-RC1...10.0.0-RC2

10.0.0-RC1

‼️ BREAKING CHANGES ‼️

[!WARNING] Please also read https://github.com/rebing/graphql-laravel/blob/master/UPGRADE.md#upgrading-from-9-to-10

This release focuses on hardening the security defaults of this library for production deployments and hence comes with breaking changes:

  • Default HTTP method changed from GET/POST to POST only
  • Batching disabled by default (batching.defaultfalse)
    • Added max_batch_size config option to limit batch query operations
  • Introspection disabled by default (GRAPHQL_DISABLE_INTROSPECTION env var)
  • Default query_max_depth set to 13 (was unlimited)
  • Default query_max_complexity set to 500 (was unlimited)
  • Authorization now runs before validation in field resolver
  • Authorization uses strict === true comparison

See also the upgrade guide from 9 to 10.

For discussion, please use https://github.com/rebing/graphql-laravel/discussions/1211

Full Changelog: https://github.com/rebing/graphql-laravel/compare/9.17.0...10.0.0-RC1

9.15.0

What's Changed

Full Changelog: https://github.com/rebing/graphql-laravel/compare/9.14.0...9.15.0

9.14.0

What's Changed

Full Changelog: https://github.com/rebing/graphql-laravel/compare/9.13.0...9.14.0

9.13.0

What's Changed

New Contributors

Full Changelog: https://github.com/rebing/graphql-laravel/compare/9.12.0...9.13.0

9.12.0

What's Changed

New Contributors

Full Changelog: https://github.com/rebing/graphql-laravel/compare/9.11.0...9.12.0

9.11.0

What's Changed

New Contributors

Full Changelog: https://github.com/rebing/graphql-laravel/compare/9.10.0...9.11.0

9.9.0

What's Changed

Full Changelog: https://github.com/rebing/graphql-laravel/compare/9.8.0...9.9.0

9.7.0

Fixed

New Contributors

Full Changelog: https://github.com/rebing/graphql-laravel/compare/9.6.0...9.7.0

9.6.0

Fixed

New Contributors

Full Changelog: https://github.com/rebing/graphql-laravel/compare/9.5.0...9.6.0

9.5.0

What's Changed

Full Changelog: https://github.com/rebing/graphql-laravel/compare/9.4.0...9.5.0

9.4.0

What's Changed

New Contributors

Full Changelog: https://github.com/rebing/graphql-laravel/compare/9.3.0...9.4.0

9.3.0

Removed

  • Support for Laravel 9 & PHP 8.0 have been removed #1123 / mfn

Full Changelog: https://github.com/rebing/graphql-laravel/compare/9.2.0...9.3.0

9.2.0
9.1.0

Fixed

  • fix schema validation - resolve not allowed in input fields #1078 / crissi

Full Changelog: https://github.com/rebing/graphql-laravel/compare/9.0.0...9.1.0

9.0.0

It's been 1 1/2 years since our last major release 8.0.0 😱

The library itself stays true to its roots, but we've to adapt to the evolving ecosystem (remove unsupported PHP and Laravel version) and stay compatible with other dependencies (e.g. graphql-php).

‼️ This release contains breaking changes, be sure to read through all of them ‼️

High level:

  • Support for PHP < 8.0 and Laravel < 9.0 was removed
  • Subtle breaking changes due to new major version 15.x of graphql-php
  • Removed support for GraphQL eager type load (= only lazy loading is done)
  • Removed the integration GraphiQL support in favour of a separate package

Breaking changes

Added

  • Upgrade to graphql-php 15 #953 / mfn
    This includes possible breaking changes also outside of this package, see also https://github.com/webonyx/graphql-php/releases/tag/v15.0.0
    Known breaking changes:

    • non-standard error related data keys are not included directly in errors.*.<non-standard error key> any more, but have been moved to errors.*.extensions.<non-standard error key>.
      Also new keys may appear here from upstream.
    • The errors.*.extensions.category has been removed upstream, but we try to keep it alive with the interface \Rebing\GraphQL\Error\ProvidesErrorCategory as it can be a useful discriminator on the client side in certain cases. But only the cases from this library are preserved, e.g. categories like request, graphql or internal are gone.
    • The \Rebing\GraphQL\Support\OperationParams has added required types due to its base class changes:
      • Old: public function getOriginalInput($key)
        new: public function getOriginalInput(string $key)
      • Old: public function isReadOnly()
        new: public function isReadOnly(): bool

    Some BC may happen also if you extended code originating in graphql-php, some examples:

    • if you implement custom types, you now have to use property types for e.g. $name or $description
    • If you used any \GraphQL\Validator\DocumentValidator in your code directly, you now need use FQCN to reference them and not the shortened string names.
    • ->getWrappedType(true) was replaced with ->getInnermostType()
    • the class \GraphQL\Type\Definition\FieldArgument has been renamed to \GraphQL\Type\Definition\Argument

Removed

  • Remove support for eager loading (=non-lazy loading) of types
    Lazy loading has been introduced in 2.0.0 (2019-08) and has been made the default since 8.0.0 (2021-11).
    The practical impact is that types are always going to be resolved using a type loader and therefore cannot use aliases anymore. Types and their type name have to match.
  • Remove integrated GraphiQL support in favour of https://github.com/mll-lab/laravel-graphiql #986 / mfn
  • Laravel 6 is no longer supported #967 / mfn
  • Laravel 8 is no longer supported #1049 / mfn

Changed

  • The type resolver is now able to resolve the top level types 'Query', 'Mutation' and 'Subscription'
    If you have an existing query/mutation/type named like this, you need to rename it.
  • Return types were added to all methods of the commands #1005 / sforward
  • Upgrade to laragraph/utils v2 #1032 / mfn
  • The Pagination and SimplePagination helper types now enforce nonNull on their data types
  • The test suite now also runs with --prefer-lowest #1055 / mfn
    This uncovered a few issues with laragraph/utils and webonyx/graphql-php and thus their minimum version had to be slightly bumped to 2.0.1 and 15.0.3 respectively.

Many thanks to all the contributors!

Full Changelog: https://github.com/rebing/graphql-laravel/compare/8.6.0...9.0.0

9.0.0-rc3

Preface

Make sure to read the release notes, which contain breaking changes ❗ , for

Highlight of 9.0.0-rc3

Full Changelog: https://github.com/rebing/graphql-laravel/compare/9.0.0-rc2...9.0.0-rc3

9.0.0-rc2

First, please make sure to make yourself familiar with the 9.0.0-rc1 release, which contains the core of breaking changes!

Highlights of 9.0.0-rc2:

Changed

  • Return types were added to all methods of the commands #1005 / sforward
  • Upgrade to laragraph/utils v2 #1032 / mfn
  • The Pagination and SimplePagination helper types now enforce nonNull on their data types #1033 / mfn

Removed

  • Remove unused publish command #1004 / sforward A leftover from the Lumen removal yers ago (#772)

Full Changelog: https://github.com/rebing/graphql-laravel/compare/9.0.0-rc1...9.0.0-rc2

9.0.0-rc1

Welcome to RC1 of the new 9.0 release cycle!

That's the good news, the "bad" news is in fact all of the changes bring breaking changes. Some induced due to transitive change updates, others directly due to feature removal / easing of maintenance.

Please carefully read through the changelog!

Breaking changes

Added

  • Upgrade to graphql-php 15 #953 / mfn
    This includes possible breaking changes also outside of this package, see also https://github.com/webonyx/graphql-php/releases/tag/v15.0.0
    Known breaking changes:

    • non-standard error related data keys are not included directly in errors.*.<non-standard error key> any more, but have been moved to errors.*.extensions.<non-standard error key>.
      Also new keys may appear here from upstream.
    • The errors.*.extensions.category has been removed upstream, but we try to keep it alive with the interface \Rebing\GraphQL\Error\ProvidesErrorCategory as it can be a useful discriminator on the client side in certain cases. But only the cases from this library are preserved, e.g. categories like request, graphql or internal are gone.
    • The \Rebing\GraphQL\Support\OperationParams has added required types due to its base class changes:
      • Old: public function getOriginalInput($key)
        new: public function getOriginalInput(string $key)
      • Old: public function isReadOnly()
        new: public function isReadOnly(): bool

    Some BC may happen also if you extended code originating in graphql-php, some examples:

    • if you implement custom types, you now have to use property types for e.g. $name or $description
    • If you used any \GraphQL\Validator\DocumentValidator in your code directly, you now need use FQCN to reference them and not the shortened string names.
    • ->getWrappedType(true) was replaced with ->getInnermostType()
    • the class \GraphQL\Type\Definition\FieldArgument has been renamed to \GraphQL\Type\Definition\Argument

Removed

  • Remove support for eager loading (=non-lazy loading) of types
    Lazy loading has been introduced in 2.0.0 (2019-08) and has been made the default since 8.0.0 (2021-11).
    The practical impact is that types are always going to be resolved using a type loader and therefore cannot use aliases anymore. Types and their type name have to match.
  • Remove integrated GraphiQL support in favour of https://github.com/mll-lab/laravel-graphiql #986 / mfn
  • Laravel 6 is no longer supported #967 / mfn

Changed

  • The type resolver is now able to resolve the top level types 'Query', 'Mutation' and 'Subscription'

Full Changelog: https://github.com/rebing/graphql-laravel/compare/8.6.0...9.0.0-rc1

8.6.0

What's Changed

Added

Full Changelog: https://github.com/rebing/graphql-laravel/compare/8.5.0...8.6.0

8.5.0

What's Changed

Added

New Contributors

Full Changelog: https://github.com/rebing/graphql-laravel/compare/8.4.0...8.5.0

8.4.0

Added

Full Changelog: https://github.com/rebing/graphql-laravel/compare/8.3.0...8.4.0

8.3.0

What's Changed

Added

Fixed

Removed

  • Support for PHP 7.2, PHP 7.3 and Laravel 7.0 (all EOL) #914 / mfn

New Contributors

Full Changelog: https://github.com/rebing/graphql-laravel/compare/8.2.1...8.3.0

8.2.1

Fixed

  • Fix schema parsing issue when route prefix is empty string #890 / hello-liang-shan
    Note: this is a follow-up fix to #888
8.2.0

Fixed

8.1.0

Added

8.0.0

After quite some RC cycles, the next major release finally arrived!

Note: this new release contains a LOT of BREAKING CHANGES, please make sure to review the change changelog and test before you deploy!

High level changes:

  • routing has been rewritten/simplified
  • processing of GraphQL requests has been unified to better accommodate for optional features like Automatic Persisted Queries (APQ)
  • lots-o-breaking changes and clean ups
  • Support for Lumen has been removed

Please find all the details below:

Breaking changes

  • Rewrite and simplify how schemas are handled

    • \Rebing\GraphQL\GraphQL::$schemas now only holds Schemas and not a mixture of strings or arrays
    • \Rebing\GraphQL\GraphQL::schema() now only accepts a "schema name", but no ad hoc Schema or "schema configs". To use ad hoc schemas, use \Rebing\GraphQL\GraphQL::buildSchemaFromConfig() and \Rebing\GraphQL\GraphQL::addSchema()
    • \Rebing\GraphQL\GraphQL::queryAndReturnResult() (and thus also \Rebing\GraphQL\GraphQL::query()) does not accept ad hoc schemas via $opts['schema'] anymore; it now only can reference a schema via its name.
    • \Rebing\GraphQL\GraphQL::addSchema() now only accept Schema objects, where before it would support ad hoc schemas via array configuration. Use \Rebing\GraphQL\GraphQL::buildSchemaFromConfig() for that now.
    • \Rebing\GraphQL\GraphQL::getSchemaConfiguration() has been removed due to the simplifications.
    • \Rebing\GraphQL\GraphQL::getNormalizedSchemaConfiguration() does not support ad hoc schemas anymore and only accepts the schema name.
    • \Rebing\GraphQL\GraphQLServiceProvider::bootSchemas() has been removed due to the simplifications.
  • The following methods now take a \Illuminate\Contracts\Config\Repository as second argument:

    • \Rebing\GraphQL\GraphQL::__construct
    • \Rebing\GraphQL\GraphQLServiceProvider::applySecurityRules
  • As part of moving the architecture to an execution based middleware approach, the following methods have been removed:

    • \Rebing\GraphQL\GraphQLController::handleAutomaticPersistQueries has been replaced by the AutomaticPersistedQueriesMiddleware middleware
    • \Rebing\GraphQL\GraphQLController::queryContext has been replaced by the AddAuthUserContextValueMiddleware middleware
      If you relied on overriding queryContext to inject a custom context, you now need to create your own execution middleware and add to your configuration
    • \Rebing\GraphQL\GraphQLController::executeQuery has become obsolete, no direct replacement.
  • Routing has been rewritten and simplified #757 / mfn

    • All routing related configuration is now within the top level route configuration key
    • The following configuration options have been removed:
      • graphql.routes
        It's therefore also not possible anymore to register different routes for queries and mutations within a schema. Each schema gets only one route (except for the default schema, which is registered for the global prefix route as well as under its name).
        If necessary, this can be emulated with different schemas and multi-level paths
    • The following configuration options have been moved/renamed:
      • graphql.prefix => graphql.route.prefix
      • graphql.controllers => graphql.route.controller
        Further, providing a controller action for query or mutation is not supported anymore.
      • graphql.middleware => graphql.route.middleware
      • graphql.route_group_attributes => graphql.route.group_attributes
    • The actual routes defined have changed:
      • No more separate routes for the HTTP methods
      • 1 route for each schema + 1 route for the group prefix (default schema)
      • If GraphiQL is enabled: 1 route graphiql route for each schema + 1 for the graphiql group prefix (default schema)
      • If provided, the 'method' argument must provide the HTTP method verbs in uppercase like POST or GET, post or get will not work.
    • It's now possible to prevent the registering of any routes by making the top level route an empty array or null
    • \Rebing\GraphQL\GraphQL::routeNameTransformer has been removed
    • It's now possible to register schemas with a - in their name
    • Routes are now properly cacheable
  • Remove the \Rebing\GraphQL\GraphQLController::$app property #755 / mfn
    Injecting the application container early is incompatible when running within an application server like laravel/octane, as it's not guaranteed that the container received contains all the bindings. If you relied on this property when extending the classes, invoke the container directly via Container::getInstance().

  • Remove deprecated \Rebing\GraphQL\Support\Type::$inputObject and \Rebing\GraphQL\Support\Type::$enumObject properties #752 / mfn
    Instead in your code, extend \Rebing\GraphQL\Support\InputType and \Rebing\GraphQL\Support\EnumType directly

  • Support for Lumen has been removed

  • Integrate laragraph/utils RequestParser #739 / mfn
    The parsing of GraphQL requests is now more strict:

    • if you send a GET request, the GraphQL query has to be in the query parameters
    • if you send a POST request, the GraphQL query needs to be in the body
      Mixing of either isn't possible anymore
    • batched queries will only work with POST requests This is due to RequestParser using \GraphQL\Server\Helper::parseRequestParams which includes this check Further:
    • Drop support for configuration the name of the variable for the variables (params_key)
    • GraphQLUploadMiddleware has been removed (RequestParser includes this functionality)
    • Empty GraphQL queries now return a proper validated GraphQL error
  • In \Rebing\GraphQL\GraphQL, renamed remaining instances of $params to $variables
    After switching to RequestParser, the support for changing the variable name what was supposed to params_key has gone and thus the name isn't fitting anymore. Also, the default value for $variables has been changed to null to better fit the how OperationParams works:

    • old: public function query(string $query, ?array $params = [], array $opts = []): array new: public function query(string $query, ?array $variables = null, array $opts = []): array

    • old: public function queryAndReturnResult(string $query, ?array $params = [], array $opts = []): ExecutionResult new: public function queryAndReturnResult(string $query, ?array $variables = null, array $opts = []): ExecutionResult

    • \Rebing\GraphQL\Support\ResolveInfoFieldsAndArguments has been removed

    • $getSelectFields closure no longer takes a depth parameter

  • The $args argument, of the handle method of the execution middlewares requires array as type.

Added

  • Command to make an execution middleware #772 / mfn
  • Command to make a schema configuration #830 / matsn0w
  • The primary execution of the GraphQL request is now piped through middlewares #762 / crissi and mfn
    This allows greater flexibility for enabling/disabling certain functionality as well as bringing in new features without having to open up the library.
  • Primarily register \Rebing\GraphQL\GraphQL as service and keep 'graphql' as alias #768 / mfn
  • Automatic Persisted Queries (APQ) now cache the parsed query #740 / mfn
    This avoids having to re-parse the same queries over and over again.
  • Add ability to detect unused GraphQL variables #660 / mfn
  • Laravel's ValidationException is now formatted the same way as a ValidationError #748 / mfn
  • A few missing typehints (mostly array related) #849 / mfn

Changed

  • Internally webonyx query plan feature is now used for retrieving information about a query #793 / crissi)
  • Rewrite and simplify how schemas are handled #779 / mfn
  • Internally stop using the global config() function and preferable use the repository or the Facade otherwise #774 / mfn
  • Don't silence broken schemas when normalizing them for generating routes #766 / mfn
  • Lazy loading types has been enabled by default #758 / mfn
  • Make it easier to extend select fields #799 / crissi
  • The $args argument, of the handle method of the execution middlewares requires array as type #843 / sforward
  • Embrace thecodingmachine/safe and use thecodingmachine/phpstan-safe-rule to enforce it #851 / mfn
  • Don't require a return value for the query option of fields #856 / sforward

Fixed

Removed

  • The method \Rebing\GraphQL\GraphQLServiceProvider::provides was removed #769 / mfn
    It's only relevant for deferred providers which ours however isn't (and can't be made into with the current Laravel architecture).
8.0.0-rc6

Changes since the last RC

  • A few missing typehints (mostly array related) #849 / mfn
  • Embrace thecodingmachine/safe and use thecodingmachine/phpstan-safe-rule to enforce it #851 / mfn

Full ChangeLog since 7.2.0

Breaking changes

  • Rewrite and simplify how schemas are handled

    • \Rebing\GraphQL\GraphQL::$schemas now only holds Schemas and not a mixture of strings or arrays
    • \Rebing\GraphQL\GraphQL::schema() now only accepts a "schema name", but no ad hoc Schema or "schema configs". To use ad hoc schemas, use \Rebing\GraphQL\GraphQL::buildSchemaFromConfig() and \Rebing\GraphQL\GraphQL::addSchema()
    • \Rebing\GraphQL\GraphQL::queryAndReturnResult() (and thus also \Rebing\GraphQL\GraphQL::query()) does not accept ad hoc schemas via $opts['schema'] anymore; it now only can reference a schema via its name.
    • \Rebing\GraphQL\GraphQL::addSchema() now only accept Schema objects, where before it would support ad hoc schemas via array configuration. Use \Rebing\GraphQL\GraphQL::buildSchemaFromConfig() for that now.
    • \Rebing\GraphQL\GraphQL::getSchemaConfiguration() has been removed due to the simplifications.
    • \Rebing\GraphQL\GraphQL::getNormalizedSchemaConfiguration() does not support ad hoc schemas anymore and only accepts the schema name.
    • \Rebing\GraphQL\GraphQLServiceProvider::bootSchemas() has been removed due to the simplifications.
  • The following methods now take a \Illuminate\Contracts\Config\Repository as second argument:

    • \Rebing\GraphQL\GraphQL::__construct
    • \Rebing\GraphQL\GraphQLServiceProvider::applySecurityRules
  • As part of moving the architecture to an execution based middleware approach, the following methods have been removed:

    • \Rebing\GraphQL\GraphQLController::handleAutomaticPersistQueries has been replaced by the AutomaticPersistedQueriesMiddleware middleware
    • \Rebing\GraphQL\GraphQLController::queryContext has been replaced by the AddAuthUserContextValueMiddleware middleware
      If you relied on overriding queryContext to inject a custom context, you now need to create your own execution middleware and add to your configuration
    • \Rebing\GraphQL\GraphQLController::executeQuery has become obsolete, no direct replacement.
  • Routing has been rewritten and simplified #757 / mfn

    • All routing related configuration is now within the top level route configuration key
    • The following configuration options have been removed:
      • graphql.routes
        It's therefore also not possible anymore to register different routes for queries and mutations within a schema. Each schema gets only one route (except for the default schema, which is registered for the global prefix route as well as under its name).
        If necessary, this can be emulated with different schemas and multi-level paths
    • The following configuration options have been moved/renamed:
      • graphql.prefix => graphql.route.prefix
      • graphql.controllers => graphql.route.controller
        Further, providing a controller action for query or mutation is not supported anymore.
      • graphql.middleware => graphql.route.middleware
      • graphql.route_group_attributes => graphql.route.group_attributes
    • The actual routes defined have changed:
      • No more separate routes for the HTTP methods
      • 1 route for each schema + 1 route for the group prefix (default schema)
      • If GraphiQL is enabled: 1 route graphiql route for each schema + 1 for the graphiql group prefix (default schema)
      • If provided, the 'method' argument must provide the HTTP method verbs in uppercase like POST or GET, post or get will not work.
    • It's now possible to prevent the registering of any routes by making the top level route an empty array or null
    • \Rebing\GraphQL\GraphQL::routeNameTransformer has been removed
    • It's now possible to register schemas with a - in their name
    • Routes are now properly cacheable
  • Remove the \Rebing\GraphQL\GraphQLController::$app property #755 / mfn
    Injecting the application container early is incompatible when running within an application server like laravel/octane, as it's not guaranteed that the container received contains all the bindings. If you relied on this property when extending the classes, invoke the container directly via Container::getInstance().

  • Remove deprecated \Rebing\GraphQL\Support\Type::$inputObject and \Rebing\GraphQL\Support\Type::$enumObject properties #752 / mfn
    Instead in your code, extend \Rebing\GraphQL\Support\InputType and \Rebing\GraphQL\Support\EnumType directly

  • Support for Lumen has been removed

  • Integrate laragraph/utils RequestParser #739 / mfn
    The parsing of GraphQL requests is now more strict:

    • if you send a GET request, the GraphQL query has to be in the query parameters
    • if you send a POST request, the GraphQL query needs to be in the body
      Mixing of either isn't possible anymore
    • batched queries will only work with POST requests This is due to RequestParser using \GraphQL\Server\Helper::parseRequestParams which includes this check Further:
    • Drop support for configuration the name of the variable for the variables (params_key)
    • GraphQLUploadMiddleware has been removed (RequestParser includes this functionality)
    • Empty GraphQL queries now return a proper validated GraphQL error
  • In \Rebing\GraphQL\GraphQL, renamed remaining instances of $params to $variables
    After switching to RequestParser, the support for changing the variable name what was supposed to params_key has gone and thus the name isn't fitting anymore. Also, the default value for $variables has been changed to null to better fit the how OperationParams works:

    • old: public function query(string $query, ?array $params = [], array $opts = []): array new: public function query(string $query, ?array $variables = null, array $opts = []): array

    • old: public function queryAndReturnResult(string $query, ?array $params = [], array $opts = []): ExecutionResult new: public function queryAndReturnResult(string $query, ?array $variables = null, array $opts = []): ExecutionResult

    • \Rebing\GraphQL\Support\ResolveInfoFieldsAndArguments has been removed

    • $getSelectFields closure no longer takes a depth parameter

  • The $args argument, of the handle method of the execution middlewares requires array as type.

Added

  • Command to make an execution middleware #772 / mfn
  • Command to make a schema configuration #830 / matsn0w
  • The primary execution of the GraphQL request is now piped through middlewares #762 / crissi and mfn
    This allows greater flexibility for enabling/disabling certain functionality as well as bringing in new features without having to open up the library.
  • Primarily register \Rebing\GraphQL\GraphQL as service and keep 'graphql' as alias #768 / mfn
  • Automatic Persisted Queries (APQ) now cache the parsed query #740 / mfn
    This avoids having to re-parse the same queries over and over again.
  • Add ability to detect unused GraphQL variables #660 / mfn
  • Laravel's ValidationException is now formatted the same way as a ValidationError #748 / mfn
  • A few missing typehints (mostly array related) #849 / mfn

Changed

  • Internally webonyx query plan feature is now used for retrieving information about a query #793 / crissi)
  • Rewrite and simplify how schemas are handled #779 / mfn
  • Internally stop using the global config() function and preferable use the repository or the Facade otherwise #774 / mfn
  • Don't silence broken schemas when normalizing them for generating routes #766 / mfn
  • Lazy loading types has been enabled by default #758 / mfn
  • Make it easier to extend select fields #799 / crissi
  • The $args argument, of the handle method of the execution middlewares requires array as type #843 / sforward
  • Embrace thecodingmachine/safe and use thecodingmachine/phpstan-safe-rule to enforce it #851 / mfn

Fixed

Removed

  • The method \Rebing\GraphQL\GraphQLServiceProvider::provides was removed #769 / mfn
    It's only relevant for deferred providers which ours however isn't (and can't be made into with the current Laravel architecture).
8.0.0-rc5

Changes since the last RC

  • The $args argument, of the handle method of the execution middlewares requires array as type #843 / sforward
  • Command to make a schema configuration #830 / matsn0w
  • Make it easier to extend select fields #799 / crissi
  • Fix TypeNotFound when an interface defined after another type where it is used #828 / kasian-sergeev

Full ChangeLog since 7.2.0

Breaking changes

  • Rewrite and simplify how schemas are handled

    • \Rebing\GraphQL\GraphQL::$schemas now only holds Schemas and not a mixture of strings or arrays
    • \Rebing\GraphQL\GraphQL::schema() now only accepts a "schema name", but no ad hoc Schema or "schema configs". To use ad hoc schemas, use \Rebing\GraphQL\GraphQL::buildSchemaFromConfig() and \Rebing\GraphQL\GraphQL::addSchema()
    • \Rebing\GraphQL\GraphQL::queryAndReturnResult() (and thus also \Rebing\GraphQL\GraphQL::query()) does not accept ad hoc schemas via $opts['schema'] anymore; it now only can reference a schema via its name.
    • \Rebing\GraphQL\GraphQL::addSchema() now only accept Schema objects, where before it would support ad hoc schemas via array configuration. Use \Rebing\GraphQL\GraphQL::buildSchemaFromConfig() for that now.
    • \Rebing\GraphQL\GraphQL::getSchemaConfiguration() has been removed due to the simplifications.
    • \Rebing\GraphQL\GraphQL::getNormalizedSchemaConfiguration() does not support ad hoc schemas anymore and only accepts the schema name.
    • \Rebing\GraphQL\GraphQLServiceProvider::bootSchemas() has been removed due to the simplifications.
  • The following methods now take a \Illuminate\Contracts\Config\Repository as second argument:

    • \Rebing\GraphQL\GraphQL::__construct
    • \Rebing\GraphQL\GraphQLServiceProvider::applySecurityRules
  • As part of moving the architecture to an execution based middleware approach, the following methods have been removed:

    • \Rebing\GraphQL\GraphQLController::handleAutomaticPersistQueries has been replaced by the AutomaticPersistedQueriesMiddleware middleware
    • \Rebing\GraphQL\GraphQLController::queryContext has been replaced by the AddAuthUserContextValueMiddleware middleware
      If you relied on overriding queryContext to inject a custom context, you now need to create your own execution middleware and add to your configuration
    • \Rebing\GraphQL\GraphQLController::executeQuery has become obsolete, no direct replacement.
  • Routing has been rewritten and simplified #757 / mfn

    • All routing related configuration is now within the top level route configuration key
    • The following configuration options have been removed:
      • graphql.routes
        It's therefore also not possible anymore to register different routes for queries and mutations within a schema. Each schema gets only one route (except for the default schema, which is registered for the global prefix route as well as under its name).
        If necessary, this can be emulated with different schemas and multi-level paths
    • The following configuration options have been moved/renamed:
      • graphql.prefix => graphql.route.prefix
      • graphql.controllers => graphql.route.controller
        Further, providing a controller action for query or mutation is not supported anymore.
      • graphql.middleware => graphql.route.middleware
      • graphql.route_group_attributes => graphql.route.group_attributes
    • The actual routes defined have changed:
      • No more separate routes for the HTTP methods
      • 1 route for each schema + 1 route for the group prefix (default schema)
      • If GraphiQL is enabled: 1 route graphiql route for each schema + 1 for the graphiql group prefix (default schema)
      • If provided, the 'method' argument must provide the HTTP method verbs in uppercase like POST or GET, post or get will not work.
    • It's now possible to prevent the registering of any routes by making the top level route an empty array or null
    • \Rebing\GraphQL\GraphQL::routeNameTransformer has been removed
    • It's now possible to register schemas with a - in their name
    • Routes are now properly cacheable
  • Remove the \Rebing\GraphQL\GraphQLController::$app property #755 / mfn
    Injecting the application container early is incompatible when running within an application server like laravel/octane, as it's not guaranteed that the container received contains all the bindings. If you relied on this property when extending the classes, invoke the container directly via Container::getInstance().

  • Remove deprecated \Rebing\GraphQL\Support\Type::$inputObject and \Rebing\GraphQL\Support\Type::$enumObject properties #752 / mfn
    Instead in your code, extend \Rebing\GraphQL\Support\InputType and \Rebing\GraphQL\Support\EnumType directly

  • Support for Lumen has been removed

  • Integrate laragraph/utils RequestParser #739 / mfn
    The parsing of GraphQL requests is now more strict:

    • if you send a GET request, the GraphQL query has to be in the query parameters
    • if you send a POST request, the GraphQL query needs to be in the body
      Mixing of either isn't possible anymore
    • batched queries will only work with POST requests This is due to RequestParser using \GraphQL\Server\Helper::parseRequestParams which includes this check Further:
    • Drop support for configuration the name of the variable for the variables (params_key)
    • GraphQLUploadMiddleware has been removed (RequestParser includes this functionality)
    • Empty GraphQL queries now return a proper validated GraphQL error
  • In \Rebing\GraphQL\GraphQL, renamed remaining instances of $params to $variables
    After switching to RequestParser, the support for changing the variable name what was supposed to params_key has gone and thus the name isn't fitting anymore. Also, the default value for $variables has been changed to null to better fit the how OperationParams works:

    • old: public function query(string $query, ?array $params = [], array $opts = []): array new: public function query(string $query, ?array $variables = null, array $opts = []): array

    • old: public function queryAndReturnResult(string $query, ?array $params = [], array $opts = []): ExecutionResult new: public function queryAndReturnResult(string $query, ?array $variables = null, array $opts = []): ExecutionResult

    • \Rebing\GraphQL\Support\ResolveInfoFieldsAndArguments has been removed

    • $getSelectFields closure no longer takes a depth parameter

  • The $args argument, of the handle method of the execution middlewares requires array as type.

Added

  • Command to make an execution middleware #772 / mfn
  • Command to make a schema configuration #830 / matsn0w
  • The primary execution of the GraphQL request is now piped through middlewares #762 / crissi and mfn
    This allows greater flexibility for enabling/disabling certain functionality as well as bringing in new features without having to open up the library.
  • Primarily register \Rebing\GraphQL\GraphQL as service and keep 'graphql' as alias #768 / mfn
  • Automatic Persisted Queries (APQ) now cache the parsed query #740 / mfn
    This avoids having to re-parse the same queries over and over again.
  • Add ability to detect unused GraphQL variables #660 / mfn
  • Laravel's ValidationException is now formatted the same way as a ValidationError #748 / mfn

Changed

  • Internally webonyx query plan feature is now used for retrieving information about a query #793 / crissi)
  • Rewrite and simplify how schemas are handled #779 / mfn
  • Internally stop using the global config() function and preferable use the repository or the Facade otherwise #774 / mfn
  • Don't silence broken schemas when normalizing them for generating routes #766 / mfn
  • Lazy loading types has been enabled by default #758 / mfn
  • Make it easier to extend select fields #799 / crissi
  • The $args argument, of the handle method of the execution middlewares requires array as type #843 / sforward

Fixed

Removed

  • The method \Rebing\GraphQL\GraphQLServiceProvider::provides was removed #769 / mfn
    It's only relevant for deferred providers which ours however isn't (and can't be made into with the current Laravel architecture).
8.0.0-rc4

Changes since the last RC

  • The configuration of the method on the schema has been brought back! Unfortunately with a twist: HTTP methods provided must be all UPPERCASE This is basically no change for the 7 -> 8 transition, but it was removed inthe initial rewrite of the routing and now brought back. Main reason is the ability to disable GraphQL for GET requests, if not desired (i.e. to prevent CSRF attacks)
  • \Rebing\GraphQL\Support\ResolveInfoFieldsAndArguments has been removed
  • $getSelectFields closure no longer takes a depth parameter
  • Internally webonyx query plan feature is now used for retrieving information about a query #793 / crissi)

Full ChangeLog since 7.2.0

Breaking changes

  • Rewrite and simplify how schemas are handled

    • \Rebing\GraphQL\GraphQL::$schemas now only holds Schemas and not a mixture of strings or arrays
    • \Rebing\GraphQL\GraphQL::schema() now only accepts a "schema name", but no ad hoc Schema or "schema configs". To use ad hoc schemas, use \Rebing\GraphQL\GraphQL::buildSchemaFromConfig() and \Rebing\GraphQL\GraphQL::addSchema()
    • \Rebing\GraphQL\GraphQL::queryAndReturnResult() (and thus also \Rebing\GraphQL\GraphQL::query()) does not accept ad hoc schemas via $opts['schema'] anymore; it now only can reference a schema via its name.
    • \Rebing\GraphQL\GraphQL::addSchema() now only accept Schema objects, where before it would support ad hoc schemas via array configuration. Use \Rebing\GraphQL\GraphQL::buildSchemaFromConfig() for that now.
    • \Rebing\GraphQL\GraphQL::getSchemaConfiguration() has been removed due to the simplifications.
    • \Rebing\GraphQL\GraphQL::getNormalizedSchemaConfiguration() does not support ad hoc schemas anymore and only accepts the schema name.
    • \Rebing\GraphQL\GraphQLServiceProvider::bootSchemas() has been removed due to the simplifications.
  • The following methods now take a \Illuminate\Contracts\Config\Repository as second argument:

    • \Rebing\GraphQL\GraphQL::__construct
    • \Rebing\GraphQL\GraphQLServiceProvider::applySecurityRules
  • As part of moving the architecture to an execution based middleware approach, the following methods have been removed:

    • \Rebing\GraphQL\GraphQLController::handleAutomaticPersistQueries has been replaced by the AutomaticPersistedQueriesMiddleware middleware
    • \Rebing\GraphQL\GraphQLController::queryContext has been replaced by the AddAuthUserContextValueMiddleware middleware
      If you relied on overriding queryContext to inject a custom context, you now need to create your own execution middleware and add to your configuration
    • \Rebing\GraphQL\GraphQLController::executeQuery has become obsolete, no direct replacement.
  • Routing has been rewritten and simplified #757 / mfn

    • All routing related configuration is now within the top level route configuration key
    • The following configuration options have been removed:
      • graphql.routes
        It's therefore also not possible anymore to register different routes for queries and mutations within a schema. Each schema gets only one route (except for the default schema, which is registered for the global prefix route as well as under its name).
        If necessary, this can be emulated with different schemas and multi-level paths
    • The following configuration options have been moved/renamed:
      • graphql.prefix => graphql.route.prefix
      • graphql.controllers => graphql.route.controller
        Further, providing a controller action for query or mutation is not supported anymore.
      • graphql.middlware => graphql.route.middleware
      • graphql.route_group_attributes => graphql.route.group_attributes
    • The actual routes defined have changed:
      • No more separate routes for the HTTP methods
      • 1 route for each schema + 1 route for the group prefix (default schema)
      • If GraphiQL is enabled: 1 route graphiql route for each schema + 1 for the graphiql group prefix (default schema)
    • It's now possible to prevent the registering of any routes by making the top level route an empty array or null
    • \Rebing\GraphQL\GraphQL::routeNameTransformer has been removed
    • It's now possible to register schemas with a - in their name
    • Routes are now properly cacheable
  • Remove the \Rebing\GraphQL\GraphQLController::$app property #755 / mfn
    Injecting the application container early is incompatible when running within an application server like laravel/octane, as it's not guaranteed that the container received contains all the bindings. If you relied on this property when extending the classes, invoke the container directly via Container::getInstance().

  • Remove deprecated \Rebing\GraphQL\Support\Type::$inputObject and \Rebing\GraphQL\Support\Type::$enumObject properties #752 / mfn
    Instead in your code, extend \Rebing\GraphQL\Support\InputType and \Rebing\GraphQL\Support\EnumType directly

  • Support for Lumen has been removed

  • Integrate laragraph/utils RequestParser #739 / mfn
    The parsing of GraphQL requests is now more strict:

    • if you send a GET request, the GraphQL query has to be in the query parameters
    • if you send a POST request, the GraphQL query needs to be in the body
      Mixing of either isn't possible anymore
    • batched queries will only work with POST requests This is due to RequestParser using \GraphQL\Server\Helper::parseRequestParams which includes this check Further:
    • Drop support for configuration the name of the variable for the variables (params_key)
    • GraphQLUploadMiddleware has been removed (RequestParser includes this functionality)
    • Empty GraphQL queries now return a proper validated GraphQL error
  • In \Rebing\GraphQL\GraphQL, renamed remaining instances of $params to $variables
    After switching to RequestParser, the support for changing the variable name what was supposed to params_key has gone and thus the name isn't fitting anymore. Also, the default value for $variables has been changed to null to better fit the how OperationParams works:

    • old: public function query(string $query, ?array $params = [], array $opts = []): array new: public function query(string $query, ?array $variables = null, array $opts = []): array

    • old: public function queryAndReturnResult(string $query, ?array $params = [], array $opts = []): ExecutionResult new: public function queryAndReturnResult(string $query, ?array $variables = null, array $opts = []): ExecutionResult

    • \Rebing\GraphQL\Support\ResolveInfoFieldsAndArguments has been removed

    • $getSelectFields closure no longer takes a depth parameter

Added

  • Command to make an execution middleware #772 / mfn
  • The primary execution of the GraphQL request is now piped through middlewares #762 / crissi and mfn
    This allows greater flexibility for enabling/disabling certain functionality as well as bringing in new features without having to open up the library.
  • Primarily register \Rebing\GraphQL\GraphQL as service and keep 'graphql' as alias #768 / mfn
  • Automatic Persisted Queries (APQ) now cache the parsed query #740 / mfn
    This avoids having to re-parse the same queries over and over again.
  • Add ability to detect unused GraphQL variables #660 / mfn
  • Laravels ValidationException is now formatted the same way as a ValidationError #748 / mfn

Changed

  • Internally webonyx query plan feature is now used for retrieving information about a query #793 / crissi)
  • Rewrite and simplify how schemas are handled #779 / mfn
  • Internally stop using the global config() function and preferable use the repository or the Facade otherwise #774 / mfn
  • Don't silence broken schemas when normalizing them for generating routes #766 / mfn
  • Lazy loading types has been enabled by default #758 / mfn

Removed

  • The method \Rebing\GraphQL\GraphQLServiceProvider::provides was removed #769 / mfn
    It's only relevant for deferred providers which ours however isn't (and can't be made into with the current Laravel architecture).
8.0.0-rc3

Due to some longer standing cleanups and embracing of a more standardized approach how to process the GraphQL request using https://github.com/laragraph/utils , a breaking changes were made for this next major version.

Note: compared to 8.0.0-rc2 , the schema handling as been changed!

To be clear (see below for details): you will need to adapt your configuration file

Breaking changes

  • Rewrite and simplify how schemas are handled

    • \Rebing\GraphQL\GraphQL::$schemas now only holds Schemas and not a mixture of strings or arrays
    • \Rebing\GraphQL\GraphQL::schema() now only accepts a "schema name", but no ad hoc Schema or "schema configs". To use ad hoc schemas, use \Rebing\GraphQL\GraphQL::buildSchemaFromConfig() and \Rebing\GraphQL\GraphQL::addSchema()
    • \Rebing\GraphQL\GraphQL::queryAndReturnResult() (and thus also \Rebing\GraphQL\GraphQL::query()) does not accept ad hoc schemas via $opts['schema'] anymore; it now only can reference a schema via its name.
    • \Rebing\GraphQL\GraphQL::addSchema() now only accept Schema objects, where before it would support ad hoc schemas via array configuration. Use \Rebing\GraphQL\GraphQL::buildSchemaFromConfig() for that now.
    • \Rebing\GraphQL\GraphQL::getSchemaConfiguration() has been removed due to the simplifications.
    • \Rebing\GraphQL\GraphQL::getNormalizedSchemaConfiguration() does not support ad hoc schemas anymore and only accepts the schema name.
    • \Rebing\GraphQL\GraphQLServiceProvider::bootSchemas() has been removed due to the simplifications.
  • The following methods now take a \Illuminate\Contracts\Config\Repository as second argument:

    • \Rebing\GraphQL\GraphQL::__construct
    • \Rebing\GraphQL\GraphQLServiceProvider::applySecurityRules
  • As part of moving the architecture to an execution based middleware approach, the following methods have been removed:

    • \Rebing\GraphQL\GraphQLController::handleAutomaticPersistQueries has been replaced by the AutomaticPersistedQueriesMiddleware middleware
    • \Rebing\GraphQL\GraphQLController::queryContext has been replaced by the AddAuthUserContextValueMiddleware middleware
      If you relied on overriding queryContext to inject a custom context, you now need to create your own execution middleware and add to your configuration
    • \Rebing\GraphQL\GraphQLController::executeQuery has become obsolete, no direct replacement.
  • Routing has been rewritten and simplified #757 / mfn

    • All routing related configuration is now within the top level route configuration key
    • The following configuration options have been removed:
      • graphql.routes
        It's therefore also not possible anymore to register different routes for queries and mutations within a schema. Each schema gets only one route (except for the default schema, which is registered for the global prefix route as well as under its name).
        If necessary, this can be emulated with different schemas and multi-level paths
    • The following configuration options have been moved/renamed:
      • graphql.prefix => graphql.route.prefix
      • graphql.controllers => graphql.route.controller
        Further, providing a controller action for query or mutation is not supported anymore.
      • graphql.middlware => graphql.route.middleware
      • graphql.route_group_attributes => graphql.route.group_attributes
    • The actual routes defined have changed:
      • No more separate routes for the HTTP methods
      • 1 route for each schema + 1 route for the group prefix (default schema)
      • If GraphiQL is enabled: 1 route graphiql route for each schema + 1 for the graphiql group prefix (default schema)
      • This also means that the per schema config key method (aka HTTP method) is not supported anymore
    • It's now possible to prevent the registering of any routes by making the top level route an empty array or null
    • \Rebing\GraphQL\GraphQL::routeNameTransformer has been removed
    • It's now possible to register schemas with a - in their name
    • Routes are now properly cacheable
  • Remove the \Rebing\GraphQL\GraphQLController::$app property #755 / mfn
    Injecting the application container early is incompatible when running within an application server like laravel/octane, as it's not guaranteed that the container received contains all the bindings. If you relied on this property when extending the classes, invoke the container directly via Container::getInstance().

  • Remove deprecated \Rebing\GraphQL\Support\Type::$inputObject and \Rebing\GraphQL\Support\Type::$enumObject properties #752 / mfn
    Instead in your code, extend \Rebing\GraphQL\Support\InputType and \Rebing\GraphQL\Support\EnumType directly

  • Support for Lumen has been removed

  • Integrate laragraph/utils RequestParser #739 / mfn
    The parsing of GraphQL requests is now more strict:

    • if you send a GET request, the GraphQL query has to be in the query parameters
    • if you send a POST request, the GraphQL query needs to be in the body
      Mixing of either isn't possible anymore
    • batched queries will only work with POST requests This is due to RequestParser using \GraphQL\Server\Helper::parseRequestParams which includes this check Further:
    • Drop support for configuration the name of the variable for the variables (params_key)
    • GraphQLUploadMiddleware has been removed (RequestParser includes this functionality)
    • Empty GraphQL queries now return a proper validated GraphQL error
  • In \Rebing\GraphQL\GraphQL, renamed remaining instances of $params to $variables
    After switching to RequestParser, the support for changing the variable name what was supposed to params_key has gone and thus the name isn't fitting anymore. Also, the default value for $variables has been changed to null to better fit the how OperationParams works:

    • old: public function query(string $query, ?array $params = [], array $opts = []): array new: public function query(string $query, ?array $variables = null, array $opts = []): array
    • old: public function queryAndReturnResult(string $query, ?array $params = [], array $opts = []): ExecutionResult new: public function queryAndReturnResult(string $query, ?array $variables = null, array $opts = []): ExecutionResult

Added

  • Command to make an exection middleware #772 / mfn
  • The primary execution of the GraphQL request is now piped through middlewares #762 / crissi and mfn
    This allows greater flexibility for enabling/disabling certain functionality as well as bringing in new features without having to open up the library.
  • Primarily register \Rebing\GraphQL\GraphQL as service and keep 'graphql' as alias #768 / mfn
  • Automatic Persisted Queries (APQ) now cache the parsed query #740 / mfn
    This avoids having to re-parse the same queries over and over again.
  • Add ability to detect unused GraphQL variables #660 / mfn
  • Laravels ValidationException is now formatted the same way as a ValidationError #748 / mfn

Changed

  • Rewrite and simplify how schemas are handled #779 / mfn
  • Internally stop using the global config() function and preferable use the repository or the Facade otherwise #774 / mfn
  • Don't silence broken schemas when normalizing them for generating routes #766 / mfn
  • Lazy loading types has been enabled by default #758 / mfn

Removed

  • The method \Rebing\GraphQL\GraphQLServiceProvider::provides was removed #769 / mfn
    It's only relevant for deferred providers which ours however isn't (and can't be made into with the current Laravel architecture).
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4