File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ A set of GraphQL server packages from Apollo that work with various Node.js HTTP
266
266
To run a hello world server with apollo-server-express:
267
267
268
268
\`\`\`bash
269
- npm install apollo-server-express express graphql
269
+ npm install apollo-server-express express
270
270
\`\`\`
271
271
272
272
Then run \`node server.js\` with this code in \`server.js\`:
@@ -275,14 +275,12 @@ Then run \`node server.js\` with this code in \`server.js\`:
275
275
const express = require('express');
276
276
const { ApolloServer, gql } = require('apollo-server-express');
277
277
278
- // Construct a schema, using GraphQL schema language
279
278
const typeDefs = gql\`
280
279
type Query {
281
280
hello: String
282
281
}
283
282
\`;
284
283
285
- // Provide resolver functions for your schema fields
286
284
const resolvers = {
287
285
Query: {
288
286
hello: () => 'Hello world!',
@@ -295,7 +293,7 @@ const app = express();
295
293
server.applyMiddleware({ app });
296
294
297
295
app.listen({ port: 4000 }, () =>
298
- console.log(\`🚀 Now browse to http://localhost:4000${ server . graphqlPath } \` )
296
+ console.log(' Now browse to http://localhost:4000' + server.graphqlPath)
299
297
);
300
298
\`\`\`
301
299
You can’t perform that action at this time.
0 commit comments