Django Graphql Auth mutations failed with error unexpected keyword argument 'refresh_token'

vs3odd8k  于 2023-11-20  发布在  Go
关注(0)|答案(1)|浏览(121)

在我的项目中,我使用以下库进行django graphql认证,
django-graphql-jwt django-graphql-auth PyJWT
我正在运行下面的突变和其他一些类似的突变。

mutation Register {
    register(
        email: "[email protected]"
        password1: "Abcd@2023"
        password2: "Abcd@2023"
    ) {
        success
        errors
        refreshToken
        token
    }
}

字符串
从昨天开始所有的突变都开始出错,

{
    "errors": [
        {
            "message": "Register.__init__() got an unexpected keyword argument 'refresh_token'",
            "locations": [
                {
                    "line": 47,
                    "column": 5
                }
            ],
            "path": [
                "register"
            ]
        }
    ],
    "data": {
        "register": null
    }
}


我试着通过切换到旧的版本来更改上面包的库版本,但没有帮助。我不明白到底发生了什么变化。请建议。

agyaoht7

agyaoht71#

我使用的是firebase-admin包,它也使用了类似于django-graphql-jwt的pyjwt库。
django-graphql-jwt库依赖于旧版本的pyjwt,而firebase-admin依赖于>=2.0.0版本。
由于django-graphql-jwt没有得到预期的版本,它失败了上面提到的错误。

相关问题