Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.
This repository was archived by the owner on Sep 7, 2020. It is now read-only.

event.context.auth is null for operationBefore, operationAfter and subscriptions even when providing a valid Authorization header. #317

Open
@marktani

Description

@marktani

Issue by meikoudras
Friday Oct 20, 2017 at 10:26 GMT
Originally opened as https://github.com/graphcool/prisma/issues/955


Current behavior
event.context.auth is null for operationBefore, operationAfter even when providing a valid Authorization header.

Reproduction
Example project
https://github.com/meikoudras/test-auth

Create a new user.

Select the user in playground.
Run in playground:
mutation ($id:ID!, $name:String!) { updateUser(id: $id, name:$name) { id name } }

This will return an error "no auth" - that means the auth property in event.context is null.

Run a resolver with the same user:

query { testAuth(a: 1, b: 1) { sum } }

This will pass as the auth property is defined.

Expected behavior?
That all functions have an event.context.auth set when an authorization header is present.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions