Skip to content
This repository was archived by the owner on May 10, 2018. It is now read-only.

fix(generators): replaces incompatible characters in schema with sane defaults #51

Merged

Conversation

akoenig
Copy link
Contributor

@akoenig akoenig commented Feb 6, 2018

This PR fixes problems with incompatible characters in the SDL. It replaces backticks with single quotes at the moment.

Background

I encountered today that the SDL contains annotated comments from time to time. For example:

"""
The `Long` scalar type represents non-fractional signed whole numeric values.
Long can represent values between -(2^63) and 2^63 - 1.
"""
scalar Long

This leads to a syntax error in ES2015 and TypeScript because the template string typedefs gets terminated by this data type annotation. This PR replaces backticks with single quotes:

"""
The 'Long' scalar type represents non-fractional signed whole numeric values.
Long can represent values between -(2^63) and 2^63 - 1.
"""
scalar Long

@kbrandwijk kbrandwijk merged commit 947c15c into graphql-binding:master Feb 6, 2018
@kbrandwijk
Copy link
Contributor

Thank you! 🙏

@akoenig
Copy link
Contributor Author

akoenig commented Feb 6, 2018

You're welcome :)

@marktani
Copy link

That's so cool, thanks!

@akoenig
Copy link
Contributor Author

akoenig commented Feb 16, 2018

🎉 😀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants