You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
My GraphQL server define custom scalar type json's an array like an example at https://graphql.org/learn/schema/#scalar-types but currently generator generate executor method args with PHP type hint's string so I can not pass an array arg to executor.
In my case above, $permissions should be type hint with mixed type so I can pass an array to it.
For custom scalar types, I think Spawnia\Sailor\Codegen\PhpType::forScalar method should be return mixed type for PHP8 and above and return empty string (mixed too) for lower PHP versions.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
My GraphQL server define custom scalar type
json
's an array like an example at https://graphql.org/learn/schema/#scalar-types but currently generator generate executor method args with PHP type hint'sstring
so I can not pass an array arg to executor.Example with graphql operation:
Will generate an executor method:
Describe the solution you'd like
In my case above,
$permissions
should be type hint withmixed
type so I can pass an array to it.For custom scalar types, I think
Spawnia\Sailor\Codegen\PhpType::forScalar
method should be returnmixed
type for PHP8 and above and return empty string (mixed too) for lower PHP versions.The text was updated successfully, but these errors were encountered: