Skip to content

How would you pass context on each operation ? #735

Answered by n1ru4l
strblr asked this question in Q&A
Discussion options

You must be logged in to vote

Hey there and sorry for the late reply - my GitHub notifications were messed up and I did not get any for this repository 😢 .

As I understand you already made the choice that you want to use @n1ru4l/socket-io-graphql-server as your GraphQL transportation layer.

There are multiple ways of applying authentication.

Authenticate before being permitted to even execute GraphQL operations

The isLazy option for registerSocketIOGraphQLServer can be used to not automatically permit users to execute GraphQL operations. Instead you can apply your custom authentication logic (e.g. a handshake) and then allow the connected socket to execute GraphQL operations via the graphQLServer.registerSocket(socket);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@strblr
Comment options

Answer selected by strblr
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