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

Fix Scala codegen emitting fields under names that don't match the schema #1008

Merged
merged 3 commits into from
Feb 13, 2019

Conversation

shadaj
Copy link
Contributor

@shadaj shadaj commented Feb 12, 2019

Fixes an oversight in the trait rewrite, since variable names in the generated traits determine the JS object that will be sent to Apollo but those variable names are transformed versions of the schema names, so there could be mismatches. This PR annotates the variables to tell Scala.js to emit those variables under the original schema names.

This can be included in a patch release, it doesn't have any breaking changes.

@shadaj shadaj force-pushed the scala-original-names branch 4 times, most recently from b5740db to 1c51ab4 Compare February 12, 2019 00:38
Copy link
Member

@trevor-scheer trevor-scheer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just want to fix the any typings and this is good to go!

packages/apollo-codegen-scala/src/codeGeneration.ts Outdated Show resolved Hide resolved
@trevor-scheer trevor-scheer merged commit 12cdd3c into apollographql:master Feb 13, 2019
@trevor-scheer
Copy link
Member

Thanks @shadaj!

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

Successfully merging this pull request may close these issues.

None yet

2 participants