Skip to content

Commit 8be22d0

Browse files
committed
Prettier
1 parent e732f31 commit 8be22d0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/code/language-support/javascript/server/apollo-server.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,30 @@ npm install @apollo/server graphql
1515
Then run `node server.js` with this code in `server.js`:
1616

1717
```js
18-
import { ApolloServer } from '@apollo/server';
19-
import { startStandaloneServer } from '@apollo/server/standalone';
18+
import { ApolloServer } from "@apollo/server"
19+
import { startStandaloneServer } from "@apollo/server/standalone"
2020

2121
// The GraphQL schema
2222
const typeDefs = `#graphql
2323
type Query {
2424
hello: String
2525
}
26-
`;
26+
`
2727

2828
// A map of functions which return data for the schema.
2929
const resolvers = {
3030
Query: {
31-
hello: () => 'world',
31+
hello: () => "world",
3232
},
33-
};
33+
}
3434

3535
const server = new ApolloServer({
3636
typeDefs,
3737
resolvers,
38-
});
38+
})
3939

40-
const { url } = await startStandaloneServer(server);
41-
console.log(`🚀 Server ready at ${url}`);
40+
const { url } = await startStandaloneServer(server)
41+
console.log(`🚀 Server ready at ${url}`)
4242
```
4343

4444
Apollo Server has a built in standalone HTTP server and middleware for Express, and has an framework integration API that supports all [Node.js HTTP server frameworks and serverless environments](https://www.apollographql.com/docs/apollo-server/integrations/integration-index) via community integrations.

0 commit comments

Comments
 (0)