chandlervdw
09/22/2017, 2:35 PMThe provided query doesn't include any known model name. Please check for the latest subscriptions API.
Relevant code: componentDidMount() {
this.createDonationSubscription = this.props.allDonationsQuery.subscribeToMore(
{
document: gql`
subscription {
Donation {
node {
id
amount
}
}
}
`,
// updateQuery: (previousState, { subscriptionData }) => {
// const newDonation = subscriptionData.data.Donation.node;
// const donations = previousState.donations.concat([newDonation]);
// return {
// allDonations: donations
// };
// },
onError: err => console.error(err) // eslint-disable-line
}
);
}
but when I try to run the following query in the graph.cool playground, it works fine (upon adding a Donation in another window): subscription {
Donation {
node {
id
amount
}
}
}
nilan
09/22/2017, 2:36 PMchandlervdw
09/22/2017, 2:37 PMchandlervdw
09/22/2017, 3:57 PMDonations
. There may be an issue with schema migrations and subscriptions. https://www.graph.cool/forum/t/schema-name-changes-break-subscriptions/1002?u=chandlervdw