DxCx / webpack-graphql-server

Starter kit for apollo server using webpack and typescript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can't find the logic behind hello world in queries

ashishsurana opened this issue · comments

I'm tring to simply save and return that custom data type

mutation{
  signUp(email:"sdc") {
    id,
    empId
  }
}

and getting the response

{
  "data": {
    "signUp": {
      "id": "58de9b20772ffc7fe65db764",
      "empId": "Hello World"
    }
  }
}

I tried to search the Hello World string but could find the string in whole project
and this value is not stored in database

hmm, 'Hello World' is generated by the mocking engine,
you are not respolving empId (and signUp returns an object without empId)
because of that it will mock the response until you will implement it.
this is used for increment feature building, and can be turned off by removing the call of
addMockFunctionsToSchema in
https://github.com/DxCx/webpack-graphql-server/blob/master/src/schema/index.ts#L34

Okay, Thanks @DxCx