Skip to content

Rolling my own session-based authentication? #342

Answered by dosco
galaczi asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, if you use GraphJin core as a library then you just have to provide the user id and or role in the context

  ctx := context.Background()
  ctx = context.WithValue(ctx, core.UserIDKey, 1)

  res, err := sg.GraphQL(ctx, query, nil, nil)
  if err != nil {
    log.Fatal(err)
  }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by galaczi
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