Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support django-graphql-jwt==0.3.1? Maybe resolve issue with info.context.user (permission) #44

Closed
patrykKlimczak opened this issue May 23, 2020 · 8 comments

Comments

@patrykKlimczak
Copy link

patrykKlimczak commented May 23, 2020

I try to get id with other model than user (or extend user model)
I use

@login_required
    def resolve_posts_partner(self, info):
        print(info.context.user.id, 'my user partner id')
        return Post.objects.order_by('-updated_at').filter(partner_id=info.context.user.id)

and I have
image

When i delete @login_required

I have
image

problem with info.context.user.id

Maybe who help me?

@ulgens
Copy link
Collaborator

ulgens commented May 23, 2020

I tried to update this package last week and got lost in broken stuff. I can try again.

@patrykKlimczak
Copy link
Author

@ulgens
problem with info.context.user.id will be resolve with upgrade jwt package?

@ulgens
Copy link
Collaborator

ulgens commented May 23, 2020

I don't have that issue with current master django-graphql-auth and 0.3 version of jwt package. If info.context.user.idis None, it looks like authentication is failing. I'm not sure this is realated to the packages.

@patrykKlimczak
Copy link
Author

@ulgens
I wrote my case with this issue #37 (comment)

@patrykKlimczak
Copy link
Author

patrykKlimczak commented May 23, 2020

@ulgens
One load page with two query

image

Two different sessions with id :O when I check change log 0.3.1 JWT maybe :)

@PedroBern
Copy link
Owner

PedroBern commented May 25, 2020

Hi @patrykKlimczak can you update your issue to use the issue template? When you have opened your issue it was already available. We need reproducible steps to help.

@patrykKlimczak
Copy link
Author

@PedroBern
Done
#46

You can probably close it

@PedroBern
Copy link
Owner

Closing in favor of #46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants