Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Graphcool.schema
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type Color implements Node {
type Color @model {
createdAt: DateTime!
fruits: [Fruit!]! @relation(name: "FruitOnColor")
hex: String!
Expand All @@ -7,7 +7,7 @@
updatedAt: DateTime!
}

type File implements Node {
type File @model {
contentType: String!
createdAt: DateTime!
id: ID! @isUnique
Expand All @@ -18,16 +18,16 @@ type File implements Node {
url: String! @isUnique
}

type Fruit implements Node {
type Fruit @model {
color: Color @relation(name: "FruitOnColor")
createdAt: DateTime!
id: ID! @isUnique
name: String!
updatedAt: DateTime!
}

type User implements Node {
type User @model {
createdAt: DateTime!
id: ID! @isUnique
updatedAt: DateTime!
}
}
4 changes: 2 additions & 2 deletions store.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const store = new Vuex.Store({
},
// You call this action to start the sunscription
subscribeToFruits(context){
fruitsSubscriptionObserver = fruitsSubscriptionObserver.subscribe({
fruitsSubscriptionObserver = fruitsSubscriptionObservable.subscribe({
next(data){
// mutation will say the type of GraphQL mutation `CREATED`, `UPDATED` or `DELETED`
console.log(data.Fruit.mutation);
Expand Down Expand Up @@ -108,4 +108,4 @@ const store = new Vuex.Store({
}
});

export default store;
export default store;