{"action":"created","issue":{"url":"https://api.github.com/repos/apollographql/apollo-cli/issues/577","repository_url":"https://api.github.com/repos/apollographql/apollo-cli","labels_url":"https://api.github.com/repos/apollographql/apollo-cli/issues/577/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/apollo-cli/issues/577/comments","events_url":"https://api.github.com/repos/apollographql/apollo-cli/issues/577/events","html_url":"https://github.com/apollographql/apollo-cli/issues/577","id":356801868,"node_id":"MDU6SXNzdWUzNTY4MDE4Njg=","number":577,"title":"Some kind of conflict with graphql-js 14.0.0","user":{"login":"Slessi","id":3223500,"node_id":"MDQ6VXNlcjMyMjM1MDA=","avatar_url":"https://avatars1.githubusercontent.com/u/3223500?v=4","gravatar_id":"","url":"https://api.github.com/users/Slessi","html_url":"https://github.com/Slessi","followers_url":"https://api.github.com/users/Slessi/followers","following_url":"https://api.github.com/users/Slessi/following{/other_user}","gists_url":"https://api.github.com/users/Slessi/gists{/gist_id}","starred_url":"https://api.github.com/users/Slessi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slessi/subscriptions","organizations_url":"https://api.github.com/users/Slessi/orgs","repos_url":"https://api.github.com/users/Slessi/repos","events_url":"https://api.github.com/users/Slessi/events{/privacy}","received_events_url":"https://api.github.com/users/Slessi/received_events","type":"User","site_admin":false},"labels":[{"id":854170453,"node_id":"MDU6TGFiZWw4NTQxNzA0NTM=","url":"https://api.github.com/repos/apollographql/apollo-cli/labels/blocking","name":"blocking","color":"b60205","default":false},{"id":854172035,"node_id":"MDU6TGFiZWw4NTQxNzIwMzU=","url":"https://api.github.com/repos/apollographql/apollo-cli/labels/has-reproduction","name":"has-reproduction","color":"42f44e","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-09-04T13:07:28Z","updated_at":"2018-10-02T16:33:44Z","closed_at":null,"author_association":"NONE","body":"<!--**Issue Labels**\r\n\r\nWhile not necessary, you can help organize our issues by labeling this issue when you open it.  To add a label automatically, simply [x] mark the appropriate box below:\r\n\r\n- [x] has-reproduction\r\n- [ ] feature\r\n- [ ] docs\r\n- [x] blocking\r\n- [ ] good first issue\r\n\r\nTo add a label not listed above, simply place `/label another-label-name` on a line by itself.\r\n-->\r\n\r\nMinimal repro here: https://github.com/Slessi/apollo-minimal-repro\r\n\r\nUsing apollo cli (tried `1.7.1` and `1.9.1`) with graphql-js `14.0.0` doesn't seem to work for generating queries.\r\n\r\nGenerating schema still ok.\r\n\r\nOK:\r\n```\r\napollo schema:download --endpoint=http://localhost:4000/graphql schema.json\r\n\r\n ✔ Loading Apollo config\r\n ✔ Fetching current schema\r\n ✔ Saving schema to schema.json\r\n```\r\n\r\nNOT OK:\r\n\r\n> *Note*: I am not actually trying to query `__typename` in my `.graphql`\r\n\r\n```\r\napollo codegen:generate --queries=src/**/*.graphql --schema=schema.json --target=typescript --addTypename --customScalarsPrefix=\\\"GQL\\\" --outputFlat src/components/GraphQL/types.ts\r\n\r\n ✔ Loading Apollo config\r\n ✔ Scanning for GraphQL queries (48 found)\r\n ✖ Generating query files with 'typescript' target\r\n   → Cannot query field \"__typename\" on type \"User\"\r\nGraphQLError: Cannot query field \"__typename\" on type \"User\"\r\n    at Compiler.compileSelection (~/<proj>/node_modules/apollo-codegen-core/lib/compiler/index.js:120:27)\r\n    at selections.selectionSetNode.selections.map.selectionNode (~/<proj>/node_modules/apollo-codegen-core/lib/compiler/index.js:106:76)\r\n    at Array.map (<anonymous>)\r\n    at Compiler.compileSelectionSet (~/<proj>/node_modules/apollo-codegen-core/lib/compiler/index.js:106:18)\r\n    at Compiler.compileFragment (~/<proj>/node_modules/apollo-codegen-core/lib/compiler/index.js:99:32)\r\n    at Object.compileToIR (~/<proj>/node_modules/apollo-codegen-core/lib/compiler/index.js:19:43)\r\n    at Object.generate [as default] (~/<proj>/node_modules/apollo/lib/generate.js:74:36)\r\n    at Task.task (~/<proj>/node_modules/apollo/lib/commands/codegen/generate.js:98:64)\r\n    at Promise.resolve.then.then.skipped (~/<proj>/node_modules/listr/lib/task.js:167:30)\r\n    at <anonymous>\r\n```\r\n\r\nThe problem begins when my project requires `14.0.0`.\r\n\r\nI can \"fix\" the problem by deleting `node_modules/apollo/node_modules/graphql/` as the library then uses `node_modules/graphql`, which is `14.0.0`, so maybe just needs a version bump? Don't understand why there would be a problem when both versions exist.\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apollographql/apollo-cli/issues/comments/426342084","html_url":"https://github.com/apollographql/apollo-cli/issues/577#issuecomment-426342084","issue_url":"https://api.github.com/repos/apollographql/apollo-cli/issues/577","id":426342084,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjM0MjA4NA==","user":{"login":"jariz","id":1415847,"node_id":"MDQ6VXNlcjE0MTU4NDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1415847?v=4","gravatar_id":"","url":"https://api.github.com/users/jariz","html_url":"https://github.com/jariz","followers_url":"https://api.github.com/users/jariz/followers","following_url":"https://api.github.com/users/jariz/following{/other_user}","gists_url":"https://api.github.com/users/jariz/gists{/gist_id}","starred_url":"https://api.github.com/users/jariz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jariz/subscriptions","organizations_url":"https://api.github.com/users/jariz/orgs","repos_url":"https://api.github.com/users/jariz/repos","events_url":"https://api.github.com/users/jariz/events{/privacy}","received_events_url":"https://api.github.com/users/jariz/received_events","type":"User","site_admin":false},"created_at":"2018-10-02T16:33:44Z","updated_at":"2018-10-02T16:33:44Z","author_association":"NONE","body":"Not being able to support GQL 0.14 is understandable, but at least update the ['quick' setup guide](https://www.apollographql.com/docs/react/essentials/get-started.html#installation) to indicate that apollo only works with 0.13 at the moment and that people need to `npm i graphql@0.13`.  \r\nJust wasted an entire day because I kept pointing the finger back at myself thinking \"no, their guide can't possibly be broken\"."}}
{"actor":{"display_login":"jariz"}}