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
Removed
  • Support for Laravel 9 & PHP 8.0 have been removed #1123 / mfn

2024-02-18, 9.2.0

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

2023-06-25, 9.0.0

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.

Removed

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

2023-02-18, 8.6.0

Added

2023-01-13, 8.5.0

Added

2023-01-06, 8.4.0

Added

2022-06-11, 8.3.0

Added

Fixed

Removed

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

2022-01-30, 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

2022-01-27, 8.2.0

Fixed

2022-01-15, 8.1.0

Added

2021-11-15, 8.0.0

Breaking
  • 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 considered 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 doesn'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 namespaces (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

2019-06-10, v1.24.0

Changed

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

2019-06-10, v1.23.0

Added

  • New config options headers to send custom HTTP headers and json_encoding_options for encoding the JSON response #293

Fixed

  • SelectFields now works with wrapped types (nonNull, listOf) #315

2019-05-31, v1.22.0

Added

  • Auto-resolve aliased fields #283
  • This project has a changelog \o/

2019-03-07, v1.21.2

  • Allow configuring a custom default field resolver #266
  • Routes have now given names, so they can be referenced #264
  • Expose more fields on the default pagination type #262
  • Mongodb support #257
  • Add support for MorphOne relationships #238
  • Checks for lumen when determining schema #247
  • Internal changes:
    • Replace deprecated global array_* and str_* helpers with direct Arr::* and Str::* calls
    • Code style now enforced via StyleCI

2019-03-07, v1.20.2

  • Fixed infinite recursion for InputTypeObject self reference #230

2019-03-03, v1.20.1

  • Laravel 5.8 support

2019-02-04, v1.19.1

  • Don't report certain GraphQL Errors

2019-02-03, v1.18.1

  • Mutation routes fix

2019-01-29, v1.18.0

  • Fix to allow recursive input objects #158

2019-01-24, v1.17.6

  • Fixed default error handler

2018-12-17, v1.17.3

  • Bump webonxy/graphql-php version requirement
  • Add support for custom error handler config handle_errors

2018-12-17, v1.16.0

  • Fixed validation

2018-07-20, v1.14.2

  • Validation error messages Can now add custom validation error messages to Queries and Mutations

2018-05-16, v1.13.0

  • Added support for query complexity and depth (more details)
  • Also added support for InputObjectType rules validation.

2018-04-20, v1.12.0

2018-04-10, v1.11.0

  • Rules supported for all Fields Added rules support for Query fields

2018-02-28, v1.9.5

  • Allow subscription types to be added Supports creating the schema, but the underlying PHP functionality does not do anything.

2018-01-05, v1.8.2

  • Updating route and controller to give us the ability to create multilevel URI names #69

2017-10-31, v1.7.3

  • Composer fix

2017-10-04, v1.7.1

  • SelectFields fix

2017-09-23, v1.6.1

  • GET routes

2017-08-27, v1.5.0

  • Enum types

2017-08-20, v1.4.9

  • Privacy validation optimized

2017-03-27, v1.4

  • Initial release
Added

2023-08-06, 9.1.0

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