Closed downace closed 11 months ago
@downace a PR would be welcomed for support. Does this include output type fields? An implementation should cover all fields, not just input type fields.
@downace a PR would be welcomed for support
Sure, working on it.
Does this include output type fields? An implementation should cover all fields, not just input type fields.
AFAIK, descriptions are currently supported everywhere (via DocBlocks or annotation's description
parameter) except fields arguments.
AFAIK, descriptions are currently supported everywhere (via DocBlocks or annotation's
description
parameter) except fields arguments.
Yes, but fields can have arguments for input and output types, and those are two different types, which have different type mappers IIRC.
Currently description is not supported for fields arguments.
I've tried to implement my own parameter middleware which takes description from the DocBlock:
Expected result example
```php class ProductController { /** * @param ID $id The product id */ #[Query] public function product(ID $id): Product { // ... } } ``` ```graphql type Query { product( "The product id" id: ID! ): Product! } ```But it's not working. I found that parameter description is ignored when creating QueryField from Descriptor, here:
https://github.com/thecodingmachine/graphqlite/blob/8d6a29248d7dc366815ce5e8677bd1e97bb9ae0b/src/InputTypeUtils.php#L115-L124