Jwt在订阅中不会生效

时间:2019-07-19 08:16:48

标签: typescript nestjs

GraphQLModule.forRoot({
      context: ({ req, connection }) =>
        connection ? { req: connection.context } : { req },
      playground: true,
      debug: true,
      autoSchemaFile: 'schema.graphql',
      installSubscriptionHandlers: true,
      subscriptions: {
        onConnect: (connectionParams: any) => {
          return connectionParams.Authorization;
        },
      },
    }),

“错误”:“无法读取未定义的属性”标题”

0 个答案:

没有答案