{"action":"closed","issue":{"url":"https://api.github.com/repos/apollographql/graphql-tag/issues/155","repository_url":"https://api.github.com/repos/apollographql/graphql-tag","labels_url":"https://api.github.com/repos/apollographql/graphql-tag/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/graphql-tag/issues/155/comments","events_url":"https://api.github.com/repos/apollographql/graphql-tag/issues/155/events","html_url":"https://github.com/apollographql/graphql-tag/issues/155","id":297864175,"number":155,"title":"parse is not a function","user":{"login":"lfernando-silva","id":11808607,"avatar_url":"https://avatars0.githubusercontent.com/u/11808607?v=4","gravatar_id":"","url":"https://api.github.com/users/lfernando-silva","html_url":"https://github.com/lfernando-silva","followers_url":"https://api.github.com/users/lfernando-silva/followers","following_url":"https://api.github.com/users/lfernando-silva/following{/other_user}","gists_url":"https://api.github.com/users/lfernando-silva/gists{/gist_id}","starred_url":"https://api.github.com/users/lfernando-silva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfernando-silva/subscriptions","organizations_url":"https://api.github.com/users/lfernando-silva/orgs","repos_url":"https://api.github.com/users/lfernando-silva/repos","events_url":"https://api.github.com/users/lfernando-silva/events{/privacy}","received_events_url":"https://api.github.com/users/lfernando-silva/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-02-16T17:35:43Z","updated_at":"2018-03-22T20:34:11Z","closed_at":"2018-03-22T20:34:11Z","author_association":"NONE","body":"I'am getting error at query declaration.\r\n\r\n`index.js:128 Uncaught TypeError: parse is not a function`\r\n\r\nDebugging, I realized the method parse at `node_modules/graphql-tag/src/index.js` is really undefined:\r\n\r\n\r\n```javascript\r\n//node_modules/graphql-tag/src/index.js\r\nvar parser = require('graphql/language/parser');\r\n\r\nvar parse = parser.parse; //parse is undefined\r\n//...\r\n//line 128\r\nvar parsed = parse(doc); //parse is not a function\r\n```\r\nThis is my code. I'm using create-react-app (v 1.5.1) and already tried to [rewire](react-app-rewire-inline-import-graphql-ast). Also didn't work with the example query.\r\n\r\n```javascript\r\nimport { graphql } from 'react-apollo'\r\nimport gql from 'graphql-tag'\r\n\r\nconst CREATE_USER_MUTATION = gql`  \r\nmutation createUserMutation ($name: String, $email: String, $category: String, $phone: String, $defaultAddress: String, $image: String, $updatedAt: Int, $createdAt: Int) {\r\n    createUser(name: $name, email: $email, category: $category, phone: $phone, defaultAddress: $defaultAddress, image: $image, updatedAt: $updatedAt, createdAt: $createdAt) {\r\n      id\r\n      name\r\n      email\r\n      category\r\n      phone\r\n      defaultAddress\r\n      createdAt\r\n    }\r\n  }\r\n`\r\n\r\nexport default graphql(CREATE_USER_MUTATION, {name: 'createUserMutation'})\r\n```\r\nThe query can be parsed well at [AST explorer](https://astexplorer.net/#/gist/drYr8X1rnP/latest).\r\n\r\nCan anyone help me?\r\n"}}
{"actor":{"display_login":"jnwng"}}