How to add authorization token in below query dynamically. This would be useful in testing cases.
apolloClient.subscribe({
query: gql`
subscription onNewItem {
newItemCreated {
id
}
}`,
variables: {}
}).subscribe({
next (data) {
// Notify your application with the new arrived data
}
});
How to add authorization token in below query dynamically. This would be useful in testing cases.