Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set description for documentation #57

Open
PGBastien opened this issue Aug 10, 2017 · 4 comments
Open

Set description for documentation #57

PGBastien opened this issue Aug 10, 2017 · 4 comments

Comments

@PGBastien
Copy link

How can we set description to Queries , Types, Fields, ... ?

@oskalo
Copy link

oskalo commented Aug 17, 2017

'price' => [
                'description' => 'This field contains price for Product',
                'type' => new StringType(),
                'args' => [
                    'currency' => new IntType(),
                ],
            ],

This options are working for type customization, but I still not find way for Queries documentation.

https://github.com/Youshido/GraphQL/blob/master/examples/02_blog/Schema/PostType.php

@PGBastien
Copy link
Author

it's OK for Fields but i don't find for Queries and Types documentation.
Thks @Oleg-Anatolievich !

@PGBastien
Copy link
Author

PGBastien commented Aug 21, 2017

For Types, add function getDescription() to your AbstractObjectType

Example :

public function getDescription()
{
return 'Description of my Type';
}

@PGBastien
Copy link
Author

The same for Queries, add function getDescription to your AbstractContainerAwareField

Example :

public function getDescription() { return "Get data from ..."; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants