Skip to content

Commit

Permalink
Allow lazy types in SchemaConfig (#1479)
Browse files Browse the repository at this point in the history
This is already supported, but not allowed by PHPStan.
  • Loading branch information
ruudk authored Nov 14, 2023
1 parent d199b8d commit b3b1e69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/class-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ Usage example:

@phpstan-type MaybeLazyObjectType ObjectType|(callable(): (ObjectType|null))|null
@phpstan-type TypeLoader callable(string $typeName): ((Type&NamedType)|null)
@phpstan-type Types iterable<Type&NamedType>|(callable(): iterable<Type&NamedType>)
@phpstan-type Types iterable<Type&NamedType>|(callable(): iterable<Type&NamedType>)|iterable<(callable(): Type&NamedType)>|(callable(): iterable<(callable(): Type&NamedType)>)
@phpstan-type SchemaConfigOptions array{
query?: MaybeLazyObjectType,
mutation?: MaybeLazyObjectType,
Expand Down
2 changes: 1 addition & 1 deletion src/Type/SchemaConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @phpstan-type MaybeLazyObjectType ObjectType|(callable(): (ObjectType|null))|null
* @phpstan-type TypeLoader callable(string $typeName): ((Type&NamedType)|null)
* @phpstan-type Types iterable<Type&NamedType>|(callable(): iterable<Type&NamedType>)
* @phpstan-type Types iterable<Type&NamedType>|(callable(): iterable<Type&NamedType>)|iterable<(callable(): Type&NamedType)>|(callable(): iterable<(callable(): Type&NamedType)>)
* @phpstan-type SchemaConfigOptions array{
* query?: MaybeLazyObjectType,
* mutation?: MaybeLazyObjectType,
Expand Down

0 comments on commit b3b1e69

Please sign in to comment.