{"action":"created","issue":{"url":"https://api.github.com/repos/howtographql/graphql-js/issues/44","repository_url":"https://api.github.com/repos/howtographql/graphql-js","labels_url":"https://api.github.com/repos/howtographql/graphql-js/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/howtographql/graphql-js/issues/44/comments","events_url":"https://api.github.com/repos/howtographql/graphql-js/issues/44/events","html_url":"https://github.com/howtographql/graphql-js/issues/44","id":362843963,"node_id":"MDU6SXNzdWUzNjI4NDM5NjM=","number":44,"title":"howtograpql - Nodejs + Prisma  - Backend - Cannot query field 'signup' on type 'Mutation'","user":{"login":"tnedich","id":6969501,"node_id":"MDQ6VXNlcjY5Njk1MDE=","avatar_url":"https://avatars0.githubusercontent.com/u/6969501?v=4","gravatar_id":"","url":"https://api.github.com/users/tnedich","html_url":"https://github.com/tnedich","followers_url":"https://api.github.com/users/tnedich/followers","following_url":"https://api.github.com/users/tnedich/following{/other_user}","gists_url":"https://api.github.com/users/tnedich/gists{/gist_id}","starred_url":"https://api.github.com/users/tnedich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnedich/subscriptions","organizations_url":"https://api.github.com/users/tnedich/orgs","repos_url":"https://api.github.com/users/tnedich/repos","events_url":"https://api.github.com/users/tnedich/events{/privacy}","received_events_url":"https://api.github.com/users/tnedich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-22T10:09:10Z","updated_at":"2018-09-25T20:34:01Z","closed_at":null,"author_association":"NONE","body":"Good day,\r\n\r\nI have cloned graphql-js repo, and changed relevant parts because I am using Prisma server localy.\r\nI am using docker-compose. Here are  relevan files:\r\n\r\n**package.json**\r\n\r\n```\r\n{\r\n  \"name\": \"hackernews-node\",\r\n  \"version\": \"1.0.0\",\r\n  \"main\": \"index.js\",\r\n  \"license\": \"MIT\",\r\n  \"scripts\": {\r\n    \"start\": \"node src/index.js\",\r\n    \"dev\": \"npm-run-all --parallel start playground\",\r\n    \"playground\": \"graphql playground\",\r\n    \"prisma\": \"prisma\",\r\n    \"graphql\": \"graphql\"\r\n  },\r\n  \"dependencies\": {\r\n    \"bcryptjs\": \"^2.4.3\",\r\n    \"graphql-yoga\": \"^1.7.0\",\r\n    \"jsonwebtoken\": \"^8.2.0\",\r\n    \"prisma-binding\": \"^2.0.2\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"graphql-cli\": \"^2.16.4\",\r\n    \"npm-run-all\": \"^4.1.2\",\r\n    \"prisma\": \"^1.9.0\"\r\n  }\r\n}\r\n\r\n```\r\n\r\n**docker-compose.yml**\r\n\r\n```\r\nversion: '3'\r\nservices:\r\n  prisma:\r\n    image: prismagraphql/prisma:1.16\r\n    restart: always\r\n    ports:\r\n    - \"4466:4466\"\r\n    environment:\r\n      PRISMA_CONFIG: |\r\n        port: 4466\r\n        databases:\r\n          default:\r\n            connector: postgres\r\n            host: postgres\r\n            port: 5432\r\n            user: prisma\r\n            password: prisma\r\n            migrations: true\r\n  postgres:\r\n    image: postgres:10.5\r\n    restart: always\r\n    ports:\r\n    - \"5432:5432\"\r\n    environment:\r\n      POSTGRES_USER: prisma\r\n      POSTGRES_PASSWORD: prisma\r\n    volumes:\r\n      - postgres:/var/lib/postgresql/data\r\nvolumes:\r\n  postgres:\r\n```\r\n\r\n**.graphqlconfig.yml**\r\n\r\n```\r\nprojects:\r\n  app:\r\n    schemaPath: src/schema.graphql\r\n    extensions:\r\n      endpoints:\r\n        default: http://localhost:4466\r\n  database:\r\n    schemaPath: src/generated/prisma.graphql\r\n    extensions:\r\n      prisma: database/prisma.yml\r\n```\r\n\r\n**prisma.yml**\r\n\r\n```\r\nendpoint: http://localhost:4466\r\ndatamodel: datamodel.graphql\r\nsecret: mysecret123\r\nhooks:\r\n  post-deploy:\r\n    - yarn graphql get-schema --project database\r\n```\r\n\r\n**.src/index.js**\r\n\r\n```\r\nconst { GraphQLServer } = require('graphql-yoga')\r\nconst { Prisma } = require('prisma-binding')\r\nconst Query = require('./resolvers/Query')\r\nconst Mutation = require('./resolvers/Mutation')\r\nconst AuthPayload = require('./resolvers/AuthPayload')\r\nconst Subscription = require('./resolvers/Subscription')\r\nconst Feed = require('./resolvers/Feed')\r\n\r\nconst resolvers = {\r\n  Query,\r\n  Mutation,\r\n  AuthPayload,\r\n  Subscription,\r\n  Feed\r\n}\r\n\r\nconst server = new GraphQLServer({\r\n  typeDefs: './src/schema.graphql',\r\n  resolvers,\r\n  context: req => ({\r\n    ...req,\r\n    db: new Prisma({\r\n      typeDefs: 'src/generated/prisma.graphql',\r\n      endpoint: 'http://localhost:4466',\r\n      secret: 'mysecret123',\r\n      debug: true,\r\n    }),\r\n  }),\r\n})\r\nserver.start(() => console.log(`Server is running on http://localhost:4466`))\r\n```\r\nWhen I run yarn dev, server starts, playground opens, everythinf works , but there are no signup, login, post mutations.\r\n\r\nBellow is image of mutations from GraphQL Playground.\r\n\r\n![screenshot 2018-09-22 12 03 37](https://user-images.githubusercontent.com/6969501/45916043-ac7f6200-be5f-11e8-9175-a0011612fa75.png)\r\n\r\nWhen trying to write post mutation I get:\r\n```\r\nmutation {\r\n  signup(\r\n    name: \"Alice\"\r\n    email: \"alice@graph.cool\"\r\n    password: \"graphql\"\r\n  ) {\r\n    token\r\n    user {\r\n      id\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nCannot query field 'signup' on type 'Mutation'\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/howtographql/graphql-js/issues/comments/424491693","html_url":"https://github.com/howtographql/graphql-js/issues/44#issuecomment-424491693","issue_url":"https://api.github.com/repos/howtographql/graphql-js/issues/44","id":424491693,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDQ5MTY5Mw==","user":{"login":"condef5","id":21107031,"node_id":"MDQ6VXNlcjIxMTA3MDMx","avatar_url":"https://avatars2.githubusercontent.com/u/21107031?v=4","gravatar_id":"","url":"https://api.github.com/users/condef5","html_url":"https://github.com/condef5","followers_url":"https://api.github.com/users/condef5/followers","following_url":"https://api.github.com/users/condef5/following{/other_user}","gists_url":"https://api.github.com/users/condef5/gists{/gist_id}","starred_url":"https://api.github.com/users/condef5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/condef5/subscriptions","organizations_url":"https://api.github.com/users/condef5/orgs","repos_url":"https://api.github.com/users/condef5/repos","events_url":"https://api.github.com/users/condef5/events{/privacy}","received_events_url":"https://api.github.com/users/condef5/received_events","type":"User","site_admin":false},"created_at":"2018-09-25T20:34:01Z","updated_at":"2018-09-25T20:34:01Z","author_association":"NONE","body":"Hi, happens that you are duplicating port 4466, in these files `graphqlconfig.yml` and `database\\prisma.yml`\r\nTry changing this line in your file `graphqlconfig.yml` :\r\n```\r\nprojects:\r\n  app:\r\n    schemaPath: src/schema.graphql\r\n    extensions:\r\n      endpoints:\r\n        default: http://localhost:4466\r\n  database:\r\n    schemaPath: src/generated/prisma.graphql\r\n    extensions:\r\n      prisma: database/prisma.yml\r\n```\r\nfor this:\r\n```\r\nprojects:\r\n  app:\r\n    schemaPath: src/schema.graphql\r\n    extensions:\r\n      endpoints:\r\n        default: http://localhost:4000\r\n  database:\r\n    schemaPath: src/generated/prisma.graphql\r\n    extensions:\r\n      prisma: database/prisma.yml\r\n```\r\nAnd then your graphql editor will be available at http://localhost:4000/"}}
{"actor":{"display_login":"condef5"}}