apollographql / apollographql/fullstack-tutorial
"final" directory outdated
- Ngôn ngữ chính
- TypeScript
- Star
- 1.2k
- Fork
- 808
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
`.env.example` doesn't seem to match the latest `APOLLO_` environment variables, and I'm getting some failing tests:
```
`(node:214719) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
FAIL src/__tests__/resolvers.mutation.js
● [Mutation.login] › returns base64 encoded email as user token if successful
expect(received).toEqual(expected) // deep equality
Expected: "YUBhLmE="
Received: undefined
103 | // check the resolver response
104 | const res = await resolvers.Mutation.login(null, args, mockContext);
> 105 | expect(res.token).toEqual('YUBhLmE=');
| ^
106 |
107 | // check if the dataSource was called with correct args
108 | expect(findOrCreateUser).toBeCalledWith(args);
at Object.toEqual (src/__tests__/resolvers.mutation.js:105:23)
(node:214721) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
FAIL src/__tests__/integration.js
● Console
console.warn node_modules/apollo-server/node_modules/apollo-engine-reporting/dist/agent.js:57
[deprecated] The `schemaTag` property within `engine` configuration has been renamed to `graphVariant`.
● Mutations › returns login token
TypeError: Cannot read property 'login' of undefined
125 | variables: {email: 'a@a.a'},
126 | });
> 127 | expect(res.data.login.token).toEqual('YUBhLmE=');
| ^
128 | });
129 |
130 | it('books trips', async () => {
at Object.login (src/__tests__/integration.js:127:21)
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
So sánh `.env.example` với các biến môi trường `APOLLO_` hiện tại, sau đó chạy các bài kiểm thử được tham chiếu trong `src/__tests__/resolvers.mutation.js` và `src/__tests__/integration.js`. Hoàn thành khi ví dụ môi trường phản ánh các biến hiện tại và các bài kiểm thử đăng nhập trả về token mong đợi mà không có các lỗi đã báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- graphql, node.js, typescript
- Lĩnh vực
- api, backend, testing
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100