2017-04-26 6 views
1

정의되지 않은 내가 오류를 다음 얻고있다apolloClient.subsribe 내가 아폴로 가입하려고

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 
}) 

답변

1

이유 때문에 잘못된 이름의 내 클라이언트 측 구독을 부착

apolloClient.Subsribe is undefined

.

apolloClient.subscribe 내 문제를 해결합니다.