当我通过 graphql-playground 创建我的所有者时,它工作正常,\n但我的测试失败并回复我“body.data.createOwner 未定义”,没有数据。
\n// owner.e2e.spec.ts\ndescribe('Owner test (e2e)', () => {\n let app: INestApplication;\n\n beforeAll(async () => {\n const moduleRef = await Test.createTestingModule({\n imports: [\n GraphQLModule.forRoot({\n autoSchemaFile: join(process.cwd(), 'src/schema.gql'),\n }),\n OwnerModule,\n DatabaseModule\n ]\n }).compile();\n app = moduleRef.createNestApplication();\n await app.init();\n });\n\n afterAll(async () => {\n await app.close();\n })\n\n const createOwnerQuery = `\n mutation createOwner($OwnerInput: OwnerInput!) {\n createOwner(ownerInput: $OwnerInput) {\n _id\n name\n firstname\n email\n password\n firstsub\n expsub\n createdAt\n updatedAt\n }\n }\n `;\n \n let id: string = '';\n\n it('createOwner', () => …Run Code Online (Sandbox Code Playgroud)