Thanks to visit codestin.com
Credit goes to github.com

Skip to content

How to document a query for the schema? #265

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

Closed
MarianNapi opened this issue May 22, 2020 · 7 comments
Closed

How to document a query for the schema? #265

MarianNapi opened this issue May 22, 2020 · 7 comments

Comments

@MarianNapi
Copy link

Is there a way to add comments to queries, types etc. so they come up in the schema.graphql?

Like in this example from Magento:
schema

@MarianNapi
Copy link
Author

Suddenly the commentary appears in the schema but not properly formatted:

comment

This is how I added the comment:
product

@moufmouf
Copy link
Member

Exactly, the comment from your PHP code queries/fields is propagated to the schema.
I probably need to document this properly.

When you say "not properly formatted", you are referring to the "new line" in front of the comment, right?

@moufmouf
Copy link
Member

(also, congrats on your first issue on Github! πŸŽ‰ ) πŸ˜„

@MarianNapi
Copy link
Author

Thanks πŸ˜„

Yeah I didn't find any hint on where to comment to get it to the schema.
And yes by "not properly formatted" I mean the new line but also the multiple quotation marks in front and behind the comment :)

@t-heuser
Copy link

A really nice feature to have would also be to be able to document the parameters for a function, as by now the PHPDoc gets ignored for paramters and is not parsed into the schema. Or is there already a way to do it and we're doing it wrong?

@moufmouf
Copy link
Member

Indeed, pretty good idea!
I'll keep the issue open until we implement it.

@oojacoboo
Copy link
Collaborator

Duplicate of #289

@oojacoboo oojacoboo marked this as a duplicate of #289 Mar 29, 2021
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

4 participants