I have a secure subscription endpoint on my apollo server. I can send subscription connectionParams from my react client by setting it in the WebSocketLink constructor and verify it in the onConnect property of ApolloServer constructor. But how do I test these subscriptions on GraphQL Playground? If I set the HTTP Headers on my subscriptions tab, it doesn't work. Is there any way to set this option in GQL playground?
            Asked
            
        
        
            Active
            
        
            Viewed 1,612 times
        
    1 Answers
1
            
            
        connectionParams can be passed using the HTTP HEADERS tab, at the bottom left corner of the graphql playground.
Example: Let's say you wanted to pass the authToken parameter to your socket connection you could do it in the following way:
{
  "authToken": "sometoken"
}
        Abhay Chatterjee
        
- 11
 - 2