-
Notifications
You must be signed in to change notification settings - Fork 29
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
Support Descriptions/BlockString from June 2018 GraphQL spec #38
Comments
Hello, Thank you for reporting this. AppSync currently does not support multiline strings comments and I'll make sure the team sees this. For the time being, the workaround is to use single line comments using the
|
Even single line """ descriptions do not work in Amplify -- the built schema.graphql does display them but not the AWS AppSync console. YAAB -- yet another AppSync bug. |
It's a little crazy that Also, |
+1 on this issue. We've worked around it thus far with hash based comments. However we've hit a case now where that doesn't work and there doesn't appear to be any work around. When documenting a field with arguments the argument comments are not returned when querying via graphiql. Below is an example of the schema.graphql: type Query {
# This comment is present in the schema and will propagate when queried introspectively
myField (
# This comment is present in the schema but does not propagate when queried introspectively
arg1: String
"This is not a valid comment but is how it should be allowed"
arg2: Int
}
} |
+1 would love to see this supported. |
Just got burnt on this. Not only the interface MyInterface implements AnotherInterface { |
I don't think the GraphQL spec allows interfaces to extend other interfaces, so that's not on AppSync. If you don't mind using a |
I think you're right on that one...my fault. With apollo server, it allows it and that's what made me assume it was part of the spec. The final schema from apollo server does not show that my interface implements another interface. |
This was actually approved in the GraphQL spec in graphql/graphql-spec#373, however this is a relatively recent change, and it is sill only included in the prerelease, working draft of the spec. I suggest opening up a separate issue to track this. |
I don't see it mentioned here, but this problem also impacts comments when using GraphQL Transform (gql-compile) from AWS Amplify. See here A good description of the issue from an integration standpoint is located here. Although there is a workaround for this issue, I feel it is important to get it resolved. It is a bad user experience to setup a GraphQL API for the first time in Amplify, and immediately have to chase down workarounds to publish the documentation for your APIs. |
That's really strange that AppSync still does not support that... We are using some libraries to combine our .graphql files together and they use |
when support this, my friends? |
+1 |
I'm seeing the same behavior that @matart15 was mentioning (2.16.0). Support for |
Should this be considered to be taken in scope, given we are almost 4 years from the spec? |
Any news on this? Almost five years since this feature has been announced, and it's still not supported by AppSync. |
Any timelines for this? |
Almost passed 5 years, and still does not have support for docstrings ? |
It's really hard to record API |
If only there were some blog posts that warned me against this problem. I would chose apollo-server or something else to establish my GraphQL api on top of. I might as well write one. |
EDIT - looks like this behavior only occurs when the page is not reloaded when switching from the schema page to the query page, so this is basically useless. Sorry for getting hopes up... It seems like (as of today at least) multi-line comments are possible in the AppSync UI (albeit with the Just treat everything above your type/field as Markdown, i.e. if you want multiline comments, add a newline in between the two lines. And as @matart15 demonstrated above, adding markdown annotations to your comments also works. # Author of a book.
#
# `givenName` - first name of the author
#
# `surname` - last name of the author
type Author {
name: String!
}
# Book in a library of books.
type Book {
ISBN: String!
title: String!
author: Author!
}
type Query {
# List all books in the library
books: [Book!]!
# Get a single author by name
#
# # This is a large comment
#
# `name` - full name of the author
author(name: String!): Author
} |
If anyone is using GraphQL Eslint and having trouble getting the |
+1 on this issue. We already have an existing well defined GQL schema and wanted to migrate to AWS Appsync. Our schema includes comments (""") per the GraphQL spec. How is this not solved yet?? I'm literally going to have to spend HOURS taking them out line by line if we want to trial Appsync. This is BS. Follow the spec!! |
We'd love to be able use docstrings on query arguments. They are supported to an extent in AppSync, in the sense that we can write them and even see them in the Schema editor, but if we introspect the API or use any of the options to export the schema, those docstrings are lost. Example:
Exported schema:
As I said, the docstrings are even present when we look at the Schema in the console, so I don't think it's unreasonable to expect them to show up in the exported schema as well. |
cmon, this is not a rocket science, it's already open for 5 years |
Any updates on this issue? |
Hello, Are there any updates on this issue? Proper documentation of the schema is urgently needed. |
+1 |
The June 2018 GraphQL spec states the following regarding descriptions (Source):
However, when attempting to provide a schema using BlockStrings for descriptions to AppSync, I receive multiple syntax errors. For example, using the example of a well-described schema from the spec, I receive multiple syntax errors such as "Unexpected string". Deploying from CloudFormation gives a less specific error of "Schema Creation Status is FAILED with details: Failed to parse schema document - ensure it's a valid SDL-formatted document."
The text was updated successfully, but these errors were encountered: