@tsed/apollo 8.34.0 → 8.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { Configuration, Inject, InjectorService, Module } from "@tsed/di";
3
- import { Logger } from "@tsed/logger";
4
2
  import { PlatformConfiguration } from "@tsed/platform-http";
3
+ import { Configuration, Inject, InjectorService, Module } from "@tsed/di";
5
4
  import { ApolloService } from "./services/ApolloService.js";
5
+ import { Logger } from "@tsed/logger";
6
6
  let ApolloModule = class ApolloModule {
7
7
  get settings() {
8
8
  return this.configuration.get("apollo", this.configuration.get("graphql", this.configuration.get("typegraphql")));
@@ -1,5 +1,5 @@
1
- import { StoreSet, useDecorators } from "@tsed/core";
2
1
  import { Injectable, ProviderScope } from "@tsed/di";
2
+ import { StoreSet, useDecorators } from "@tsed/core";
3
3
  import { DATASOURCES_PROVIDERS } from "../constants/constants.js";
4
4
  /**
5
5
  * Create a new injectable DataSource.
@@ -1,4 +1,4 @@
1
- import { decoratorTypeOf, DecoratorTypes } from "@tsed/core";
1
+ import { DecoratorTypes, decoratorTypeOf } from "@tsed/core";
2
2
  import { Inject, InjectContext } from "@tsed/di";
3
3
  import { APOLLO_CONTEXT } from "../constants/constants.js";
4
4
  /**
@@ -1,13 +1,13 @@
1
- import Http from "node:http";
2
- import Https from "node:https";
1
+ import { APOLLO_CONTEXT, DATASOURCES_PROVIDERS } from "../constants/constants.js";
3
2
  import { ApolloServer } from "@apollo/server";
4
- import { ApolloServerPluginLandingPageDisabled } from "@apollo/server/plugin/disabled";
3
+ import { LocalsContainer, constant, context, inject, injectable, injector, logger } from "@tsed/di";
4
+ import { PlatformApplication } from "@tsed/platform-http";
5
+ import { $asyncAlter } from "@tsed/hooks";
5
6
  import { ApolloServerPluginDrainHttpServer } from "@apollo/server/plugin/drainHttpServer";
7
+ import { ApolloServerPluginLandingPageDisabled } from "@apollo/server/plugin/disabled";
6
8
  import { ApolloServerPluginLandingPageLocalDefault } from "@apollo/server/plugin/landingPage/default";
7
- import { constant, context, inject, injectable, injector, LocalsContainer, logger } from "@tsed/di";
8
- import { $asyncAlter } from "@tsed/hooks";
9
- import { PlatformApplication } from "@tsed/platform-http";
10
- import { APOLLO_CONTEXT, DATASOURCES_PROVIDERS } from "../constants/constants.js";
9
+ import Http from "node:http";
10
+ import Https from "node:https";
11
11
  export class ApolloService {
12
12
  constructor() {
13
13
  this.platformName = constant("PLATFORM_NAME");
@@ -1,8 +1,8 @@
1
- import { InjectorService } from "@tsed/di";
2
- import { Logger } from "@tsed/logger";
3
1
  import { AfterListen, OnRoutesInit, PlatformConfiguration } from "@tsed/platform-http";
4
- import { ApolloSettings } from "./interfaces/ApolloSettings.js";
2
+ import { InjectorService } from "@tsed/di";
5
3
  import { ApolloService } from "./services/ApolloService.js";
4
+ import { ApolloSettings } from "./interfaces/ApolloSettings.js";
5
+ import { Logger } from "@tsed/logger";
6
6
  export declare class ApolloModule implements OnRoutesInit, AfterListen {
7
7
  protected logger: Logger;
8
8
  protected service: ApolloService;
@@ -1,5 +1,5 @@
1
- import type { PlatformContext } from "@tsed/platform-http";
2
1
  import type { ApolloContext } from "./ApolloContext.js";
2
+ import type { PlatformContext } from "@tsed/platform-http";
3
3
  export interface AlterApolloContext<Context extends ApolloContext = ApolloContext> {
4
4
  $alterApolloContext(context: Context, $ctx: PlatformContext): Context | Promise<Context>;
5
5
  }
@@ -1,8 +1,8 @@
1
1
  import type { ApolloServer, ApolloServerOptions, ApolloServerOptionsWithSchema } from "@apollo/server";
2
+ import type { ApolloContext } from "./ApolloContext.js";
2
3
  import type { GatewayInterface } from "@apollo/server-gateway-interface";
3
- import type { IExecutableSchemaDefinition } from "@graphql-tools/schema";
4
4
  import type { GraphQLSchema } from "graphql/index.js";
5
- import type { ApolloContext } from "./ApolloContext.js";
5
+ import type { IExecutableSchemaDefinition } from "@graphql-tools/schema";
6
6
  export type ApolloMiddlewareOptions = Record<string, any>;
7
7
  export type ApolloCustomServerCB<TContext extends ApolloContext> = (config: ApolloServerOptions<TContext>) => ApolloServer<TContext>;
8
8
  declare global {
@@ -1,11 +1,11 @@
1
- import Http from "node:http";
2
- import Https from "node:https";
1
+ import type { ApolloCustomServerCB, ApolloSettings } from "../interfaces/ApolloSettings.js";
3
2
  import { ApolloServer, ApolloServerOptions } from "@apollo/server";
4
- import type { IExecutableSchemaDefinition } from "@graphql-tools/schema";
5
3
  import { PlatformApplication } from "@tsed/platform-http";
6
- import type { GraphQLSchema } from "graphql";
7
4
  import { ApolloContext } from "../interfaces/ApolloContext.js";
8
- import type { ApolloCustomServerCB, ApolloSettings } from "../interfaces/ApolloSettings.js";
5
+ import type { GraphQLSchema } from "graphql";
6
+ import Http from "node:http";
7
+ import Https from "node:https";
8
+ import type { IExecutableSchemaDefinition } from "@graphql-tools/schema";
9
9
  export declare class ApolloService {
10
10
  platformName: string | undefined;
11
11
  /**
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@tsed/apollo",
3
+ "version": "8.36.0",
3
4
  "description": "Apollo package for Ts.ED framework",
4
- "type": "module",
5
- "version": "8.34.0",
6
5
  "source": "./src/index.ts",
6
+ "type": "module",
7
7
  "main": "./lib/esm/index.js",
8
8
  "module": "./lib/esm/index.js",
9
9
  "typings": "./lib/types/index.d.ts",
@@ -32,15 +32,14 @@
32
32
  "@as-integrations/express5": "1.1.2",
33
33
  "@as-integrations/fastify": "3.1.0",
34
34
  "@as-integrations/koa": "1.1.1",
35
- "@tsed/barrels": "8.34.0",
36
- "@tsed/core": "8.34.0",
37
- "@tsed/di": "8.34.0",
35
+ "@tsed/barrels": "8.36.0",
36
+ "@tsed/core": "8.36.0",
37
+ "@tsed/di": "8.36.0",
38
38
  "@tsed/logger": "^8.0.0",
39
- "@tsed/platform-http": "8.34.0",
40
- "@tsed/typescript": "8.34.0",
39
+ "@tsed/platform-http": "8.36.0",
40
+ "@tsed/typescript": "8.36.0",
41
41
  "apollo-datasource-http": "0.21.0",
42
42
  "apollo-server-testing": "2.26.2",
43
- "eslint": "9.12.0",
44
43
  "graphql": "16.12.0",
45
44
  "typescript": "6.0.2",
46
45
  "vitest": "4.1.4"
package/readme.md CHANGED
@@ -56,13 +56,13 @@ If you are using express you need to install its respective integration:
56
56
 
57
57
  - Express 4 - [@as-integrations/express4](https://www.npmjs.com/package/@as-integrations/express4)
58
58
 
59
- ``` bash
59
+ ```bash
60
60
  npm install --save @as-integrations/express4
61
61
  ```
62
62
 
63
63
  - Express 5 - [@as-integrations/express5](https://www.npmjs.com/package/@as-integrations/express5)
64
64
 
65
- ``` bash
65
+ ```bash
66
66
  npm install --save @as-integrations/express5
67
67
  ```
68
68