Skip to content

How can i set cookie with graphql-laravel #896

Answered by frankmaruf
frankmaruf asked this question in Q&A
Discussion options

You must be logged in to vote

I am doing it in my Resolver

UserLoginMutation

class UserLoginMutation extends Mutation
{
    protected $attributes = [
        'name' => 'userLogin',
        'description' => 'Login user',
    ];
    public function type(): Type
    {
        return GraphQL::type('LoginResponse');
    }
    /** @var \App\Models\MyUserModel $user **/

    public function args(): array
    {
        return [
            'email' => [
                'name' => 'email',
                'type' => Type::nonNull(Type::string())
            ],
            "password" => [
                'name' => 'password',
                'type' => Type::nonNull(Type::string())
            ],
        ];
    }
    public functio…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@mfn
Comment options

@frankmaruf
Comment options

Answer selected by frankmaruf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants