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

Generation of nested structures with the same name results in compiler errors #169

Closed
nubstick27 opened this issue Feb 8, 2017 · 1 comment

Comments

@nubstick27
Copy link
Contributor

There appears to be an issue with nested structures which define the same name multiple times.

Briefly, a structure such as:

mutation UpvotePost($postId: Int!) {
  upvotePost(postId: $postId) {
    ...PostDetails
  }
}

results in a generated class like:

public final class UpvotePost implements Mutation<UpvotePost.Variables> {
    public static class Data implements Operation.Data {
        public static class UpvotePost { ... }
    }
}

which has a compilation error.

@sav007
Copy link
Contributor

sav007 commented Feb 9, 2017

We are going to use the same logic for resolving dup names by adding $ as suffix, so in this case we ate going to have UpvotePost$

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

No branches or pull requests

3 participants