Skip to content

Commit

Permalink
final bits before talk
Browse files Browse the repository at this point in the history
  • Loading branch information
cleverbeagle committed Aug 17, 2017
1 parent 3abe5f9 commit 5b745bf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions imports/startup/server/fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const documentsSeed = userId => ({
owner: userId,
title: `Document #${dataIndex + 1}`,
body: `This is the body of document #${dataIndex + 1}`,
createdAt: (new Date()).toISOString(),
updatedAt: (new Date()).toISOString(),
};
},
});
Expand Down
4 changes: 3 additions & 1 deletion imports/startup/server/graphql/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ app.use('/graphql', graphqlHTTP({
graphiql: true,
}));

app.listen(4000);
app.listen(4000, () => {
console.log('GraphQL Server listening on port 4000. Mark Zuckerberg is listening on all ports.');
});
4 changes: 2 additions & 2 deletions imports/ui/pages/Documents/Documents.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ export default compose(
},
},
`, {
options: ({ userId }) => ({
options: ({ userId }) => ({ // Argument being destructured is props passed to component.
pollInterval: 10000,
variables: {
owner: userId,
},
}),
}),
graphql(gql`
mutation remomveDocument($_id: String!) {
mutation removeDocument($_id: String!) {
removeDocument(_id: $_id) {
_id
}
Expand Down

0 comments on commit 5b745bf

Please sign in to comment.