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

number-prefixed words in multi-line descriptions trigger generator error #53

Closed
idiomatic opened this issue Nov 12, 2021 · 0 comments · Fixed by #54
Closed

number-prefixed words in multi-line descriptions trigger generator error #53

idiomatic opened this issue Nov 12, 2021 · 0 comments · Fixed by #54
Labels
bug Something isn't working

Comments

@idiomatic
Copy link
Contributor

Describe the bug
A description containing words like "720p" throws:

Error: Unexpected token p at 403:23

upon generating Swift via swift-graphql.

To Reproduce
Add a documented type to a schema:

"""
Resolution
Example: Medium is 720p
"""
enum Resolution {
  LOW
  MEDIUM
  HIGH
}

Start GraphQL server, then confirm description integrity:

curl -X POST -H"Content-Type: application/json" -d '{"query":"query{__type(name:\"Resolution\") {name description}}"}' http://localhost:8080/query

Resulting in:

{"data":{"__type":{"name":"Resolution","description":"Resolution\nExample: Medium is 720p"}}}

Generate Swift:

swift-graphql http://localhost:8080/query

Expected behavior
Swift output.

@idiomatic idiomatic changed the title number-prefixed words in descriptions trigger generator error number-prefixed words in multi-line descriptions trigger generator error Nov 12, 2021
@maticzav maticzav added the bug Something isn't working label Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants