Skip to content

Commit

Permalink
Step 2.7: Connect Resolvers to GraphQL Server
Browse files Browse the repository at this point in the history
  • Loading branch information
srtucker22 authored and Simon Tucker committed Aug 26, 2018
1 parent 2d25655 commit 7fd1b8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
npm-debug.log
yarn-error.log
.vscode
.vscode
chatty.sqlite
7 changes: 6 additions & 1 deletion server/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { ApolloServer } from 'apollo-server';
import { typeDefs } from './data/schema';
import { mocks } from './data/mocks';
import { resolvers } from './data/resolvers';

const PORT = 8080;

const server = new ApolloServer({ typeDefs, mocks });
const server = new ApolloServer({
resolvers,
typeDefs,
// mocks,
});

server.listen({ port: PORT }).then(({ url }) => console.log(`🚀 Server ready at ${url}`));

0 comments on commit 7fd1b8a

Please sign in to comment.