File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/code/language-support/javascript/server Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -17,17 +17,18 @@ Then run `node server.js` with this code in `server.js`:
1717``` js
1818import { ApolloServer } from " @apollo/server"
1919import { startStandaloneServer } from " @apollo/server/standalone"
20- import { buildSchema } from " graphql"
2120
22- const schema = buildSchema (`
23- type Query {
24- hello: String
25- }
26- ` )
21+ // The GraphQL schema
22+ const typeDefs = ` #graphql
23+ type Query {
24+ hello: String
25+ }
26+ `
2727
28+ // A map of functions which return data for the schema.
2829const resolvers = {
2930 Query: {
30- hello : () => " Hello World! " ,
31+ hello : () => " world " ,
3132 },
3233}
3334
@@ -37,7 +38,6 @@ const server = new ApolloServer({
3738})
3839
3940const { url } = await startStandaloneServer (server)
40-
4141console .log (` 🚀 Server ready at ${ url} ` )
4242```
4343
You can’t perform that action at this time.
0 commit comments