diff --git a/Graphcool.schema b/Graphcool.schema index e9d3426..cea239b 100644 --- a/Graphcool.schema +++ b/Graphcool.schema @@ -1,4 +1,4 @@ -type Color implements Node { +type Color @model { createdAt: DateTime! fruits: [Fruit!]! @relation(name: "FruitOnColor") hex: String! @@ -7,7 +7,7 @@ updatedAt: DateTime! } -type File implements Node { +type File @model { contentType: String! createdAt: DateTime! id: ID! @isUnique @@ -18,7 +18,7 @@ type File implements Node { url: String! @isUnique } -type Fruit implements Node { +type Fruit @model { color: Color @relation(name: "FruitOnColor") createdAt: DateTime! id: ID! @isUnique @@ -26,8 +26,8 @@ type Fruit implements Node { updatedAt: DateTime! } -type User implements Node { +type User @model { createdAt: DateTime! id: ID! @isUnique updatedAt: DateTime! -} \ No newline at end of file +} diff --git a/store.js b/store.js index 74cc627..c30277d 100644 --- a/store.js +++ b/store.js @@ -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); @@ -108,4 +108,4 @@ const store = new Vuex.Store({ } }); -export default store; \ No newline at end of file +export default store;