Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion extensions/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"@loopback/rest": "^15.0.1"
},
"dependencies": {
"@apollo/server": "^4.13.0",
"@apollo/server": "^5.5.1",
"@as-integrations/express4": "^1.1.2",
"@graphql-tools/utils": "^11.1.0",
"@loopback/http-server": "^7.0.12",
"body-parser": "^2.2.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {ExpressContextFunctionArgument} from '@apollo/server/dist/esm/express4';
import {ExpressContextFunctionArgument} from '@as-integrations/express4';
import {expect} from '@loopback/testlab';
import {
field,
Expand Down
2 changes: 1 addition & 1 deletion extensions/graphql/src/graphql.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {ExpressContextFunctionArgument} from '@apollo/server/dist/esm/express4';
import {ExpressContextFunctionArgument} from '@as-integrations/express4';
import {
Binding,
BindingScope,
Expand Down
13 changes: 7 additions & 6 deletions extensions/graphql/src/graphql.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,25 @@ import {
ApolloServerOptionsWithSchema,
BaseContext,
} from '@apollo/server';
import {ExpressMiddlewareOptions} from '@apollo/server/dist/esm/express4';
import {expressMiddleware} from '@apollo/server/express4';
import {
ExpressMiddlewareOptions,
expressMiddleware,
} from '@as-integrations/express4';
import {printSchemaWithDirectives} from '@graphql-tools/utils';
import {
Binding,
BindingFromClassOptions,
BindingKey,
BindingScope,
config,
Constructor,
Context,
ContextTags,
Server,
config,
createBindingFromClass,
filterByTag,
inject,
lifeCycleObserver,
Server,
} from '@loopback/core';
import {HttpServer} from '@loopback/http-server';
import {RestBindings, RestServer} from '@loopback/rest';
Expand All @@ -38,10 +40,10 @@ import * as http from 'http';
import * as https from 'https';
import {
AuthChecker,
buildSchema,
NonEmptyArray,
ResolverInterface,
BuildSchemaOptions as TypeGrahpQLBuildSchemaOptions,
buildSchema,
} from 'type-graphql';
import {Middleware} from 'type-graphql/build/typings/typings/middleware';
import {WebSocketServer} from 'ws';
Expand Down Expand Up @@ -174,7 +176,6 @@ export class GraphQLServer extends Context implements Server {
const serverConfig = {
...this.options.apollo,
schema,
status400ForVariableCoercionErrors: true,
// plugins: [ApolloServerPluginDrainHttpServer({ httpServer: this.httpServer })],
} as ApolloServerOptionsWithSchema<BaseContext>;
const graphQLServer = new ApolloServer(serverConfig);
Expand Down
2 changes: 1 addition & 1 deletion extensions/graphql/src/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {ExpressMiddlewareOptions} from '@apollo/server/dist/esm/express4';
import {ExpressMiddlewareOptions} from '@as-integrations/express4';
import {BindingKey, Constructor, CoreBindings} from '@loopback/core';
import {AuthChecker, PubSub, ResolverData} from 'type-graphql';
import {GraphQLComponent} from './graphql.component';
Expand Down
Loading