小编Ale*_* C.的帖子

GraphQL 架构未使用 NestJS 更新(代码优先方法)

我对 GraphQL 还很陌生,我面临着最新版本的 NestJS 的问题,我目前正在尝试向解析器添加一个突变,当服务器运行时,该解析器不会显示在操场上。

看起来 GraphQL 模式在服务器启动时没有更新。

createUser 突变在 GraphQL 游乐场中显示并且正在运行,但 getUsers 突变(为测试目的而创建)未显示。

我将不胜感激任何关于如何解决这个问题的提示。

在 app.module 中导入 GraphQLMOdule

import { Module } from '@nestjs/common';
// Libraries
import { TypeOrmModule } from '@nestjs/typeorm';
import { GraphQLModule } from '@nestjs/graphql';
// App modules
import { MealModule } from './meal/meal.module';
import { AuthModule } from './auth/auth.module';
// Entities
import { MealEntity } from './meal/meal.entity';
import { UserEntity } from './auth/user.entity';

@Module({
  imports: [
    TypeOrmModule.forRoot({
      type: 'mongodb',
      url: 'mongodb://localhost/sideproject',
      synchronize: true,
      useUnifiedTopology: true, …
Run Code Online (Sandbox Code Playgroud)

graphql nestjs

5
推荐指数
1
解决办法
5650
查看次数

标签 统计

graphql ×1

nestjs ×1