apollographql / apollographql/fullstack-tutorial
"final" directory outdated
- 主要语言
- TypeScript
- 星标
- 1.2k
- 派生
- 808
- PR 合并指标
- 30 天内没有已合并 PR
描述
`.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)
```
贡献指南
这个仓库没有索引到贡献指南
调研方向
将 `.env.example` 与当前的 `APOLLO_` 环境变量进行比较,然后运行 `src/__tests__/resolvers.mutation.js` 和 `src/__tests__/integration.js` 中引用的测试。当环境示例反映当前变量,并且登录测试返回预期的 token 且没有报告的失败时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- graphql, node.js, typescript
- 领域
- api, backend, testing
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100