In my project I am using below libraries for django graphql authentication,
django-graphql-jwt django-graphql-auth PyJWT
I am running below mutation and some other similar mutations.
mutation Register {
register(
email: "appleorange@gmail.com"
password1: "Abcd@2023"
password2: "Abcd@2023"
) {
success
errors
refreshToken
token
}
}
From yesterday suddenly all mutations started failing with error,
{
"errors": [
{
"message": "Register.__init__() got an unexpected keyword argument 'refresh_token'",
"locations": [
{
"line": 47,
"column": 5
}
],
"path": [
"register"
]
}
],
"data": {
"register": null
}
}
I tried changing the library versions for above package by switching to the old one but that did not help. I don't understand what exactly changed. Please suggest.
I was using firebase-admin package which is also using pyjwt library similar to django-graphql-jwt.
The django-graphql-jwt library is depend upon older version of pyjwt wherewas firebase-admin depend on >=2.0.0 version.
Since django-graphql-jwt was not getting intended version, it was failing with above mentioned error.