-
Notifications
You must be signed in to change notification settings - Fork 737
Support for GraphQL #767
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
Comments
Thanks for the suggestion. I'm not fundamentally opposed to broadening the project's scope to cover GraphQL (a similar request has been made for message, although it's yet to get much traction), but I'm not sure what it would look like. With a GraphQL schema largely being self-documenting and projects like https://github.com/graphql/graphiql and https://www.npmjs.com/package/graphql-docs, I'm not sure that there's much room to add Spring-specific value for documenting GraphQL APIs. That said, I may well be overlooking something. What did you have in mind? |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
|
I'm not sure we really need extended Spring for GraphQL support in this project. Unlike a vanilla REST endpoint, GraphQL APIs are based on a schema with well-defined queries and types (comments included). There are a few tools out there that generate static documentation using only the schema (see graphdoc and graphql-voyager). While they're mostly providing a different view of the schema itself, they're showing a quite complete view of the API already. I don't think that disabling schema introspection (spring-projects/spring-graphql#38) is really a case for this. IMO it really breaks expectations and doesn't really offer extra security. GraphQL also supports queries with variables, which are I think a much better base for examples in an API documentation. Spring for GraphQL already supports such queries declared in files when testing your application. At this point, the only missing bit is about including those as code snippets in your asciidoctor documentation. |
Thanks, Brian. That strengthens my feeling that there's little value to add here for documenting a GraphQL-based API, particularly given Spring for GraphQL's support for testing with queries declared in files. @ArtyomGabeev @cforce Given the above, what gaps do you think are left to fill? |
I saw the added value in recording the ran queries from the test as query by example. |
From what @bclozel was saying, I think you may be able to do this using Asciidoctor's |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
Hi,
Not sure is it a correct place to start the conversation.
Recently Spring team announced support for GraphQL: https://spring.io/projects/spring-graphql
I'm wondering what it will take to provide a support for spring-restdocs project to support documentation for GraphQL.
Couple of questions:
Thanks,
Artyom
The text was updated successfully, but these errors were encountered: