I'm currently using Lighthouse as the graphql server for laravel. I've worked through the subscription documentation (https://lighthouse-php.com/master/subscriptions/getting-started.html) on their site, as well as added the appropriate pusher credentials to the .env file.
When attempting to subscribe via the graphql-playground UI, I'm getting the following error:
subscription:
subscription {
orgUserCreated {
org
}
}
error:
{
"error": "Could not connect to websocket endpoint ws://localhost:8000/graphql. Please check if the endpoint url is correct."
}
All mutations and queries are working as they should.
I've overridden the index.blade.php file for the laravel-graphql-playground laravel and can add a "subscriptionEndpoint" variable to that file, but it's unclear what that variable should contain.
<script type="text/javascript">
window.addEventListener('load', function (event) {
const loadingWrapper = document.getElementById('loading-wrapper');
loadingWrapper.classList.add('fadeOut');
const root = document.getElementById('root');
root.classList.add('playgroundIn');
GraphQLPlayground.init(root, {
endpoint: "{{url(config('graphql-playground.endpoint'))}}",
subscriptionEndpoint: "?"
})
})
</script>
Does anyone know what should be contained in the "subscriptionEndpoint" variable since I'm connecting via pusher?