You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
263 B

6 years ago
import ApolloClient, { gql } from 'apollo-boost';
const sub = gql`
subscription props {
newProperty: {
name
}
}
`;
const client = new ApolloClient({
uri: 'http://localhost:4000',
});
client.subscribe({ query: sub}).forEach(res => console.log("res"));