aws-appsync-community icon indicating copy to clipboard operation
aws-appsync-community copied to clipboard

Bug on enum value descriptions

Open yvele opened this issue 4 years ago • 8 comments

Using descriptions on enum values is not working.

This schema makes AppSync schema parser going crazy

# Represents the individual results of a search.
enum SearchType {
  # Returns results matching objects.
  OBJECT
  # Returns results matching users.
  USER
}

Gives:

image

I'm forced to remove all enum value descriptions in my schema...

# Represents the individual results of a search.
enum SearchType {
  OBJECT
  USER
}

Is there any workaround to set description on enum values?

Maybe related to:

  • https://github.com/aws/aws-appsync-community/issues/38

yvele avatar Sep 26 '19 09:09 yvele

Hi yvele, you are correct that descriptions for now are only permitted on the whole enum declaration, not on specific enum values. The workaround is to describe the enum values in the description of the enum declaration, as you showed above. I know this situation isn't ideal, and we're working on adding support for this and other, newer syntax.

AaronHarris avatar Oct 16 '19 20:10 AaronHarris

Any updates on this? Still encountering this issue.

smare avatar Apr 16 '20 20:04 smare

2021 - this is still a bit annoying. can't put any comments inside of an enum without it breaking AppSync

stefangomez avatar Jan 02 '21 07:01 stefangomez

Please fix this issue!

mattgrogan avatar Sep 10 '21 12:09 mattgrogan

Would also love to see this fixed. In the interest of being customer obsessed, insisting on the highest standards, and earning trust, it would be very nice if AppSync could implement the GraphQL spec: https://spec.graphql.org/June2018/

Comments behave like white space and may appear after any token, or before a line terminator, and have no significance to the semantic meaning of a GraphQL Document.

2.5 years is a lot of radio silence since the comment "we're working on adding support for this and other, newer syntax."

sirrus233 avatar Mar 22 '22 11:03 sirrus233

it's too much

@jpignata Any updates on this?

AgentIvan avatar Sep 01 '23 14:09 AgentIvan

@jpignata Can you fix this ?

alexvcreatoriq avatar Sep 01 '23 14:09 alexvcreatoriq

@jpignata From my quick testing, it seems like the AppSync graphql parser is able to handle some comments but fails on others. When it is able to successfully parse the comment, it simply removes the comment during the save operation.

But when it fails to parse the comment, it seems like there are specific categories of things that it can't parse. I've found that it can't handle any repeated words in the comments, nor can it handle the word "on" being anywhere in the comment.

Any updates on this topic would be appreciated.

mkarges-valerahealth avatar Feb 12 '24 19:02 mkarges-valerahealth