Update apollo-server

This commit is contained in:
Trevor Blades
2022-02-11 11:44:32 -08:00
parent d5b12425c4
commit cae9c10bee
3 changed files with 398 additions and 955 deletions

View File

@@ -1,4 +1,5 @@
import {ApolloServer, gql} from 'apollo-server';
import {ApolloServerPluginLandingPageGraphQLPlayground} from 'apollo-server-core';
import {buildSubgraphSchema} from '@apollo/subgraph';
import {readFileSync} from 'fs';
import {resolvers} from './resolvers.js';
@@ -8,7 +9,7 @@ const typeDefs = gql(readFileSync('./schema.graphql', 'utf-8'));
const server = new ApolloServer({
schema: buildSubgraphSchema({typeDefs, resolvers}),
introspection: true,
playground: true
plugins: [ApolloServerPluginLandingPageGraphQLPlayground()]
});
server.listen({port: process.env.PORT || 4000}).then(({url}) => {

1347
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -10,7 +10,8 @@
},
"dependencies": {
"@apollo/subgraph": "^0.3.1",
"apollo-server": "^2.25.3",
"apollo-server": "^3.6.3",
"apollo-server-core": "^3.6.3",
"countries-list": "^2.5.4",
"graphql": "^15.8.0",
"provinces": "^1.11.0",