benawad / type-graphql-series

Typescript GraphQL Server built with TypeGraphQL
326 stars 129 forks source link

Register resolver test returns null #22

Closed ishank-s closed 4 years ago

ishank-s commented 4 years ago

Register functionality is doing fine but the test seems to return null on data. Register › create user

expect(received).toMatchObject(expected)

- Expected
+ Received

  Object {
-   "data": Object {
-     "register": Object {
-       "email": "Kurtis_Hamill53@hotmail.com",
-       "firstName": "Reginald",
-       "lastName": "Windler",
-     },
-   },
+   "data": null,
  }

  44 |     });
  45 | 

at src/modules/user/register/Register.test.ts:46:22 at fulfilled (src/modules/user/register/Register.test.ts:5:58)

benawad commented 4 years ago

Is this after cloning the project?

ishank-s commented 4 years ago

First followed along, then just copied the source dir since config would be different

benawad commented 4 years ago

Try adding some console.logs to see why the resolver returns null

ishank-s commented 4 years ago

Hi thanks for your prompt response, i'll update this on the weekend. PS: Thanks for your tutorial sir. Maybe start a patreon/Subscribe star

benawad commented 4 years ago

@prophet1996 https://www.patreon.com/benawad

ishank-s commented 4 years ago

Started running all the same. Prob env issue