Has anyone experienced the following error when at...
# orm-help
d
Has anyone experienced the following error when attempting to make a subscription using Apollo Client in a react application?
Copy code
Unhandled GraphQL subscription error TypeError: this.subscriptionClient.request is not a function
The prop that is being used to make the subscription call has been wrapped in the graphql container:
Copy code
this.subscribeToAgents(fetchInitialData);
.
.
.
    subscribeToAgents = fetchInitialData => {
    fetchInitialData.subscribeToMore({
      document: gql`
    subscription{
        Agent{
            mutation
            node {
                id
                name
                status
            }
        }
    }
`;,
      updateQuery: (previous, { subscriptionData } ) => {
        const { updateAgent } = this.props;
        updateAgent(subscriptionData.Agent.node);
      },
    });
  };
.
.
.
    graphql(FetchInitialData, {
    name: 'fetchInitialData',
    options: ({ contentStore: { start, end } }) => ({ variables: { start, end } }),
  }),
Note: the Apollo Client has been created to use a hybrid link that uses the split function just like the docs lay out and http requests are completed fine when made.