2017-04-26 1 views
1

Je suis en train de souscrire l'apollo et je me fais erreur suivantapolloClient.subsribe est définie

apolloClient.Subsribe is undefined

Fixation mon abonnement côté client

const networkInterface = createNetworkInterface('http://localhost:8000/graphql'); 

const wsClient = new SubscriptionClient(`ws://localhost:8000/`, { 
       reconnect: true, 
       connectionParams: { 
       } 
}); 

const networkInterfaceWithSubscriptions = addGraphQLSubscriptions(networkInterface,wsClient); 


const apolloClient = new ApolloClient({ 
    networkInterface: networkInterfaceWithSubscriptions 
}) 

Répondre

1

La raison est à cause du mauvais nom .

apolloClient.subscribe corrige mon problème