taikn
09/21/2017, 5:44 PMGregory Forel
09/21/2017, 7:07 PMid
field: `id: ID! @isUnique`' when doing graphcool push
. Is this related? Note that I checked my code a few times, everything was working before this.zaksingh
09/21/2017, 7:21 PMupdate
system of apollo?zaksingh
09/21/2017, 7:24 PMupdate
for to utilize subscriptions instead? It seems like a much cleaner, easier systemcartogram
09/22/2017, 12:01 AMchandlervdw
09/22/2017, 2:40 AMaddGraphQLSubscriptions
from subscriptions-transport-ws
, which will soon be deprecated: https://github.com/apollographql/subscriptions-transport-ws/issues/169. I see in the comments that https://github.com/scf4/add-graphql-subscriptions is an option, i.e. import { addGraphQLSubscriptions } from 'add-graphql-subscriptions';
but now it’s throwing the following error: wsClient.subscribe is not a function
.chandlervdw
09/22/2017, 2:45 AMmatty
09/22/2017, 6:29 AMmatty
09/22/2017, 6:29 AMcongy
09/22/2017, 7:48 AMPieter
09/22/2017, 10:28 AMchandlervdw
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
}
}
}
chandlervdw
09/22/2017, 2:35 PMDonations
to Donation
chandlervdw
09/22/2017, 2:36 PMdevan
09/22/2017, 3:56 PMallan
09/22/2017, 3:56 PMlewisblackwood
09/22/2017, 3:59 PMcreatedAt
and updatedAt
value by default? Is there a way to include those fields?johninvancouver
09/22/2017, 4:07 PMlewisblackwood
09/22/2017, 4:12 PMcreatedAt
and updatedAt
as system fields...Sheel Patel
09/22/2017, 6:04 PMlifeiscontent
09/22/2017, 6:08 PMlifeiscontent
09/22/2017, 7:20 PMlifeiscontent
09/22/2017, 7:44 PM$ graphcool deploy
▸ Please provide either a default environment, a project or an environment you want to deploy to.
lifeiscontent
09/22/2017, 7:44 PMjohninvancouver
09/22/2017, 8:19 PMMutinix
09/22/2017, 9:25 PMMutinix
09/22/2017, 9:26 PMtype MutateStoreProduct {
create(storeId: Long!, entry: StoreProductInput!): StoreProductEntry!
}
type StoreProductEntry {
id: Long!
name: String!
store: StoreEntry!
catalogItem: CatalogEntry!
price: Long!
}
input StoreProductInput {
id: Long
name: String!
catalogItemId: Long!
price: Long!
}
Mutinix
09/22/2017, 9:27 PMMutinix
09/22/2017, 9:28 PMandreas.hard
09/22/2017, 10:41 PMGraphQLID
type for id’s at least:
id: ID! @isUnique