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

allow "$" char in names #102

Closed
chandu0101 opened this issue Oct 6, 2015 · 2 comments
Closed

allow "$" char in names #102

chandu0101 opened this issue Oct 6, 2015 · 2 comments

Comments

@chandu0101
Copy link

scala.js emits constructor names with$ chars , react-relay takes constructor name as mutation query name and resulting in failed transactions :(. i reported this in scala.js channel

@sjrd is it possible to remove $ in generated constructor/class names for scalajsdefined classes ? graphql supported names set /[_A-Za-z][_0-9A-Za-z]*/, with current constructor names graphql api requests are failing in fastOptJS mode

response from scala.js author :

@chandu0101 No it is not possible. graphql most be fixed to support all valid Javascript identifiers.

so is it possible to accept names that comply with javascript identifiers ?

@xsistens
Copy link

xsistens commented Oct 7, 2015

👍

@leebyron
Copy link
Collaborator

leebyron commented Jan 9, 2016

I don't think we will consider doing this because GraphQL wishes to be compatible with many languages and so have designed valid identifiers to be that which is common across many popular languages. Unfortunately characters like $, ! and ? which are legal identifier characters in some languages are not in other popular languages.

It looks like handling this at the relay layer to ensure that any code that is generating GraphQL identifiers from JavaScript identifiers properly handles the conversion is the correct decision.

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

No branches or pull requests

3 participants