{"action":"created","issue":{"url":"https://api.github.com/repos/apollostack/apollo-server/issues/43","repository_url":"https://api.github.com/repos/apollostack/apollo-server","labels_url":"https://api.github.com/repos/apollostack/apollo-server/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/apollostack/apollo-server/issues/43/comments","events_url":"https://api.github.com/repos/apollostack/apollo-server/issues/43/events","html_url":"https://github.com/apollostack/apollo-server/issues/43","id":163597050,"number":43,"title":"How to split schemas into separate files?","user":{"login":"wuzhuzhu","id":8170316,"avatar_url":"https://avatars.githubusercontent.com/u/8170316?v=3","gravatar_id":"","url":"https://api.github.com/users/wuzhuzhu","html_url":"https://github.com/wuzhuzhu","followers_url":"https://api.github.com/users/wuzhuzhu/followers","following_url":"https://api.github.com/users/wuzhuzhu/following{/other_user}","gists_url":"https://api.github.com/users/wuzhuzhu/gists{/gist_id}","starred_url":"https://api.github.com/users/wuzhuzhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wuzhuzhu/subscriptions","organizations_url":"https://api.github.com/users/wuzhuzhu/orgs","repos_url":"https://api.github.com/users/wuzhuzhu/repos","events_url":"https://api.github.com/users/wuzhuzhu/events{/privacy}","received_events_url":"https://api.github.com/users/wuzhuzhu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-04T03:26:35Z","updated_at":"2016-07-04T06:58:55Z","closed_at":null,"body":"userSchema: (author schema like the same)\r\n\r\n> export const schema = [`\r\n  type Email {\r\n    address: String\r\n    verified: Boolean\r\n  }\r\n  \r\n>  type User {\r\n    emails: [Email]\r\n    username: String\r\n    randomString: String\r\n  }\r\n`];\r\n\r\nrootSchema: \r\n> import { schema as userSchema, resolvers as userResolver } from './user/schema';\r\n> const rootSchema = [`\r\n   type RootQuery {\r\n    author(name: String): Author\r\n    user: User\r\n   }\r\n   \r\n   \r\n>   schema {\r\n    query: RootQuery\r\n  }\r\n`]\r\n\r\n> export const schema = [...rootSchema, ...userSchema, ...authorSchema];\r\n\r\n-----\r\n\r\nWhen I trying to contact schemas into 1 typedefinition in GitHunt way(seems its the only one example had separate schemas), I got this:\r\n`[ '\\n   type RootQuery {\\n    author(name: String): Author\\n    user: User\\n   }\\n   \\n   \\n   schema {\\n    query: RootQuery\\n  }\\n',\r\nI20160704-11:08:53.149(8)?   '\\n  type Email {\\n    address: String\\n    verified: Boolean\\n  }\\n  \\n  type User {\\n    emails: [Email]\\n    username: String\\n    randomString: String\\n  }\\n',\r\nI20160704-11:08:53.149(8)?   '\\n# This uses the exact field names returned by the GitHub API for simplicity\\ntype Author {\\n    name: String\\n    books: [Book]\\n  }\\n  \\n  type Book {\\n    name: String\\n    author: [Author]\\n    \\n' ] { RootQuery: { user: [Function: user], author: [Function: author] }`\r\n\r\nAlso I found the generateSchema in docs is deprecated. And I have no idea how to use the  GraphQLSchema instance generated."},"comment":{"url":"https://api.github.com/repos/apollostack/apollo-server/issues/comments/230218882","html_url":"https://github.com/apollostack/apollo-server/issues/43#issuecomment-230218882","issue_url":"https://api.github.com/repos/apollostack/apollo-server/issues/43","id":230218882,"user":{"login":"wuzhuzhu","id":8170316,"avatar_url":"https://avatars.githubusercontent.com/u/8170316?v=3","gravatar_id":"","url":"https://api.github.com/users/wuzhuzhu","html_url":"https://github.com/wuzhuzhu","followers_url":"https://api.github.com/users/wuzhuzhu/followers","following_url":"https://api.github.com/users/wuzhuzhu/following{/other_user}","gists_url":"https://api.github.com/users/wuzhuzhu/gists{/gist_id}","starred_url":"https://api.github.com/users/wuzhuzhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wuzhuzhu/subscriptions","organizations_url":"https://api.github.com/users/wuzhuzhu/orgs","repos_url":"https://api.github.com/users/wuzhuzhu/repos","events_url":"https://api.github.com/users/wuzhuzhu/events{/privacy}","received_events_url":"https://api.github.com/users/wuzhuzhu/received_events","type":"User","site_admin":false},"created_at":"2016-07-04T06:58:55Z","updated_at":"2016-07-04T06:58:55Z","body":"Thanks for answer. \r\nWhen I trying to use `makeExecutableSchema `, I still got error when using concated typeDefs:\r\nAm i miss something when doing this? \r\n`export const schema = [...rootSchema, ...userSchema, ...authorSchema];`\r\n\r\n> /Users/walter/.meteor/packages/meteor-tool/.1.3.4_1.mi2rro++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280\r\nW20160704-14:55:00.879(8)? (STDERR) \t\t\t\t\t\tthrow(ex);\r\nW20160704-14:55:00.879(8)? (STDERR) \t\t\t\t\t\t      ^\r\nW20160704-14:55:00.879(8)? (STDERR) Syntax Error GraphQL (27:21) Expected Name, found EOF\r\nW20160704-14:55:00.880(8)? (STDERR) \r\nW20160704-14:55:00.880(8)? (STDERR) 26:     name: String\r\nW20160704-14:55:00.880(8)? (STDERR) 27:     author: [Author]\r\n"}}
{"actor":{"display_login":"wuzhuzhu"}}