{"action":"created","issue":{"url":"https://api.github.com/repos/apollographql/apollo-ios/issues/23","repository_url":"https://api.github.com/repos/apollographql/apollo-ios","labels_url":"https://api.github.com/repos/apollographql/apollo-ios/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/apollo-ios/issues/23/comments","events_url":"https://api.github.com/repos/apollographql/apollo-ios/issues/23/events","html_url":"https://github.com/apollographql/apollo-ios/issues/23","id":190392279,"node_id":"MDU6SXNzdWUxOTAzOTIyNzk=","number":23,"title":"Incorrect code generation: String instead of Int","user":{"login":"nikola-mladenovic","id":14024032,"node_id":"MDQ6VXNlcjE0MDI0MDMy","avatar_url":"https://avatars3.githubusercontent.com/u/14024032?v=4","gravatar_id":"","url":"https://api.github.com/users/nikola-mladenovic","html_url":"https://github.com/nikola-mladenovic","followers_url":"https://api.github.com/users/nikola-mladenovic/followers","following_url":"https://api.github.com/users/nikola-mladenovic/following{/other_user}","gists_url":"https://api.github.com/users/nikola-mladenovic/gists{/gist_id}","starred_url":"https://api.github.com/users/nikola-mladenovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikola-mladenovic/subscriptions","organizations_url":"https://api.github.com/users/nikola-mladenovic/orgs","repos_url":"https://api.github.com/users/nikola-mladenovic/repos","events_url":"https://api.github.com/users/nikola-mladenovic/events{/privacy}","received_events_url":"https://api.github.com/users/nikola-mladenovic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-11-18T18:44:16Z","updated_at":"2018-10-16T20:48:54Z","closed_at":null,"author_association":"NONE","body":"Steps to reproduce:\r\n\r\n- Use the schema from: https://github.com/commercetools/commercetools-sunrise-ios/blob/issues/%2394-product-graphql/Sunrise/schema.json\r\n- The only query used was: https://github.com/commercetools/commercetools-sunrise-ios/blob/issues/%2394-product-graphql/Sunrise/Models/Queries/ProductOverview.graphql\r\n\r\nThe resulting `API.swift` that was generated using `apollo-ios` version 0.4 and `apollo-codegen` version 0.9 contains: `public let centAmount: String` (`MoneyDetails` struct property). The actual type from the schema:\r\n```\r\n{\r\n\"name\": \"centAmount\",\r\n\"type\": {\r\n  \"kind\": \"NON_NULL\",\r\n  \"name\": null,\r\n  \"ofType\": {\r\n    \"kind\": \"SCALAR\",\r\n    \"name\": \"Long\",\r\n    \"ofType\": null\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/apollographql/apollo-ios/issues/comments/430395222","html_url":"https://github.com/apollographql/apollo-ios/issues/23#issuecomment-430395222","issue_url":"https://api.github.com/repos/apollographql/apollo-ios/issues/23","id":430395222,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDM5NTIyMg==","user":{"login":"daksharma","id":6915451,"node_id":"MDQ6VXNlcjY5MTU0NTE=","avatar_url":"https://avatars1.githubusercontent.com/u/6915451?v=4","gravatar_id":"","url":"https://api.github.com/users/daksharma","html_url":"https://github.com/daksharma","followers_url":"https://api.github.com/users/daksharma/followers","following_url":"https://api.github.com/users/daksharma/following{/other_user}","gists_url":"https://api.github.com/users/daksharma/gists{/gist_id}","starred_url":"https://api.github.com/users/daksharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daksharma/subscriptions","organizations_url":"https://api.github.com/users/daksharma/orgs","repos_url":"https://api.github.com/users/daksharma/repos","events_url":"https://api.github.com/users/daksharma/events{/privacy}","received_events_url":"https://api.github.com/users/daksharma/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T20:48:54Z","updated_at":"2018-10-16T20:48:54Z","author_association":"NONE","body":"Hi @martijnwalraven \r\nIt seems like the typealias was a viable solution for many people. I tried the `typealias Long = Int64` and the extension that you have posted above.\r\nWhen generating the API.swift file I am using the `----passthroughCustomScalars` flag, when building the project Xcode/Swift complains about `Property cannot be declared public because its type uses an internal type`. \r\n\r\nI am using Apollo through Cocoapods and the Apollo cli (not apollo-codegen) as well as the script provided in the installation process of the apollo ios website. \r\nI tried both Swift 4 and Swift 4.2 in the build settings. but the error persists.\r\n\r\nThis error is in the API.swift file. No typealias is declared in the generated file. \r\n<img width=\"994\" alt=\"screen shot 2018-10-16 at 1 20 16 pm\" src=\"https://user-images.githubusercontent.com/6915451/47045776-84c2a780-d148-11e8-95f1-0dcde61adcb7.png\">\r\n\r\nSince API.swift should not be modified, any idea on how this can be resolved. "}}
{"actor":{"display_login":"daksharma"}}