小编hor*_*omi的帖子

如何使用石墨烯突变信息访问 django 请求

我收到此错误“WSGIRequest”对象没有属性“请求”

PS:片段被截断了。错误来自 info.context.request

  class Arguments:
    input = ForgotPasswordInput()

  ok = graphene.Boolean()
  message = graphene.String()

  @staticmethod
  def mutate(root, info, input=None):
    try:
      user = User.objects.get(email=input.get('email'))
      current_site = get_current_site(info.context.request)```

Run Code Online (Sandbox Code Playgroud)

django graphene-django

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

标签 统计

django ×1

graphene-django ×1