{"action":"created","issue":{"url":"https://api.github.com/repos/apollostack/apollo-ios/issues/26","repository_url":"https://api.github.com/repos/apollostack/apollo-ios","labels_url":"https://api.github.com/repos/apollostack/apollo-ios/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/apollostack/apollo-ios/issues/26/comments","events_url":"https://api.github.com/repos/apollostack/apollo-ios/issues/26/events","html_url":"https://github.com/apollostack/apollo-ios/issues/26","id":191226734,"number":26,"title":"\"Use of undeclared type\" on code generation for nested input objects","user":{"login":"beno","id":46243,"avatar_url":"https://avatars.githubusercontent.com/u/46243?v=3","gravatar_id":"","url":"https://api.github.com/users/beno","html_url":"https://github.com/beno","followers_url":"https://api.github.com/users/beno/followers","following_url":"https://api.github.com/users/beno/following{/other_user}","gists_url":"https://api.github.com/users/beno/gists{/gist_id}","starred_url":"https://api.github.com/users/beno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beno/subscriptions","organizations_url":"https://api.github.com/users/beno/orgs","repos_url":"https://api.github.com/users/beno/repos","events_url":"https://api.github.com/users/beno/events{/privacy}","received_events_url":"https://api.github.com/users/beno/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-11-23T09:52:30Z","updated_at":"2016-11-24T14:24:45Z","closed_at":"2016-11-24T12:28:34Z","body":"I have a fairly complex input schema, sometimes depending on 2 or 3 nested input objects. When I generate a swift API for this, I end up with an API.swift file with errors, complaining about a few (nested and seemingly random) input types it hasn't defined. Here's an example of the Swift output, interstingly the offending declarations are listed right at the top. Important to note that all these input objects are correctly defined and the API works fine in standalone testing.\r\n\r\n```swift\r\n//  This file was automatically generated and should not be edited.\r\n\r\nimport Apollo\r\n\r\npublic struct BookInput: GraphQLMapConvertible {\r\n  public let writtenBy: WrittenByInput     // <= ERROR: Use of undeclared type 'WrittenByInput`\r\n  public let name: String\r\n\r\n  public var graphQLMap: GraphQLMap {\r\n    return [\"writtenBy\": writtenBy, \"name\": name]\r\n  }\r\n}\r\n\r\npublic struct PublishedByInput: GraphQLMapConvertible {\r\n  public let publisher: IdInput     // <= ERROR: Use of undeclared type 'IdInput`\r\n\r\n  public var graphQLMap: GraphQLMap {\r\n    return [\"publisher\": publisher]\r\n  }\r\n}\r\n\r\npublic final class ListBooksQuery: GraphQLQuery {\r\n  public static let operationDefinition =\r\n    \"query ListBooks {\" +\r\n    \"  books {\" +\r\n    \"    id\" +\r\n```\r\n\r\nversions: Apollo 0.4.1, apollo-codegen 0.9.1 "},"comment":{"url":"https://api.github.com/repos/apollostack/apollo-ios/issues/comments/262787820","html_url":"https://github.com/apollostack/apollo-ios/issues/26#issuecomment-262787820","issue_url":"https://api.github.com/repos/apollostack/apollo-ios/issues/26","id":262787820,"user":{"login":"beno","id":46243,"avatar_url":"https://avatars.githubusercontent.com/u/46243?v=3","gravatar_id":"","url":"https://api.github.com/users/beno","html_url":"https://github.com/beno","followers_url":"https://api.github.com/users/beno/followers","following_url":"https://api.github.com/users/beno/following{/other_user}","gists_url":"https://api.github.com/users/beno/gists{/gist_id}","starred_url":"https://api.github.com/users/beno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beno/subscriptions","organizations_url":"https://api.github.com/users/beno/orgs","repos_url":"https://api.github.com/users/beno/repos","events_url":"https://api.github.com/users/beno/events{/privacy}","received_events_url":"https://api.github.com/users/beno/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T14:24:45Z","updated_at":"2016-11-24T14:24:45Z","body":"Well, so far, so good, it all seems to be working. Yay!"}}
{"actor":{"display_login":"beno"}}