- 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
- Allow
'alias'
to be a callback #452 / crissi
- Internal
- Properly separate larastans' phpstan config from ours #451 / szepeviktor
- Support adding Schema objects directly #449 / mfn
- Input arguments are properly parsed when objects or lists are passed #419 / sowork
- The
UploadType
now has to be added manually to thetypes
in your schema if you want to use it- The
::getInstance()
method is gone
- The
- 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)
- before:
- 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 support for lazy loading types (config
lazyload_types
), improve performance on large type systems #405 but doens't work together with type aliases orpaginate()
. - 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 dedicatedEnumType
, deprecating$enumObject=true
in theType
class - New
make:graphql:scalar
command and add more information regarding scalars to the readme TypeConvertible
interface requiring to implementtoType(): \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 interfacealias
is now also supported for relationships #367InputType
support class which eventually replace$inputObject=true
#363- Support
DB::raw()
inalias
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
- 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
, notApp\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
andcdnjs.cloudflare.com
- If you're using CSP, be sure to allow
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
- 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
\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
- Prefix named GraphiQL routes with
graphql.
for compatibility with Folklore #360
- New config options
headers
to send custom HTTP headers andjson_encoding_options
for encoding the JSON response #293
- SelectFields now works with wrapped types (nonNull, listOf) #315
- Auto-resolve aliased fields #283
- This project has a changelog
\o/
- 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_*
andstr_*
helpers with directArr::*
andStr::*
calls - Code style now enforced via StyleCI
- Replace deprecated global
- Fixed infinite recursion for InputTypeObject self reference #230
- Laravel 5.8 support
- Don't report certain GraphQL Errors
- Mutation routes fix
- Fix to allow recursive input objects #158
- Fixed default error handler
- Bump webonxy/graphql-php version requirement
- Add support for custom error handler config
handle_errors
- Fixed validation
- Validation error messages Can now add custom validation error messages to Queries and Mutations
- Added support for query complexity and depth (more details)
- Also added support for InputObjectType rules validation.
- Rules supported for all Fields
Added
rules
support for Query fields
- Allow subscription types to be added Supports creating the schema, but the underlying PHP functionality does not do anything.
- Updating route and controller to give us the ability to create multilevel URI names #69
- Updating route and controller so it give us the ability to create multi level URI names
- Composer fix
- SelectFields fix
- GET routes
- Enum types
- Privacy validation optimizied
- Initial release