diff --git a/biome.json b/biome.json index 3385587..6ada7f4 100644 --- a/biome.json +++ b/biome.json @@ -56,6 +56,18 @@ } } } + }, + { + "include": [ + "graphql*sdk.ts" + ], + "linter": { + "rules": { + "suspicious": { + "noExplicitAny": "off" + } + } + } } ] } diff --git a/packages/core/src/container.ts b/packages/core/src/container.ts index 078385c..71e0108 100644 --- a/packages/core/src/container.ts +++ b/packages/core/src/container.ts @@ -1,10 +1,11 @@ -import { registry, singleton } from "tsyringe"; -export { singleton as injectable }; -export { container, inject, injectAll } from "tsyringe"; +import { injectable, registry } from "tsyringe"; +// export { singleton as injectable }; +export { container, inject, injectAll, injectable } from "tsyringe"; export const makeRegistryDecorator = (token: symbol) => (): ClassDecorator => (target) => { const targetConstructor = target as unknown as new () => unknown; - singleton()(targetConstructor); + injectable()(targetConstructor); + // singleton()(targetConstructor); registry([{ token, useClass: targetConstructor }])(targetConstructor); }; diff --git a/packages/core/src/graphql/graphql-decorators.test.ts b/packages/core/src/graphql/graphql-decorators.test.ts index 7b900a8..b9dc302 100644 --- a/packages/core/src/graphql/graphql-decorators.test.ts +++ b/packages/core/src/graphql/graphql-decorators.test.ts @@ -21,7 +21,7 @@ describe("graphql-decorators", () => { it("should register a class in the container", () => { @resolver() class HelloResolver {} - expect(container.isRegistered(HelloResolver)).toEqual(true); + expect(container.resolve(HelloResolver)).toBeDefined(); }); it("should register a class as a resolver in the container", () => { diff --git a/packages/core/src/graphql/graphql-server.ts b/packages/core/src/graphql/graphql-server.ts index 19f91b1..2c4c953 100644 --- a/packages/core/src/graphql/graphql-server.ts +++ b/packages/core/src/graphql/graphql-server.ts @@ -1,9 +1,10 @@ import { promises as fs } from "node:fs"; +import path from "node:path"; import { ApolloServer, ApolloServerOptions, BaseContext } from "@apollo/server"; import fastifyApollo, { fastifyApolloDrainPlugin, } from "@as-integrations/fastify"; -import { assign, recursiveReaddir } from "@athenajs/utils"; +import { assignDeep } from "@athenajs/utils"; import { FastifyInstance } from "fastify"; import { GraphQLFieldResolver } from "graphql"; import { createBatchResolver } from "graphql-resolve-batch"; @@ -66,12 +67,15 @@ export class GraphQLServer { async getTypeDefs(): Promise { const dirs = this.config.graphqlSchemaDirs.join(", "); this.logger.debug(`loading graphql type definitions from ${dirs}`); - const schemaPaths = await Promise.all( - this.config.graphqlSchemaDirs.map((d) => recursiveReaddir(d)), - ); - return Promise.all( - schemaPaths.flat().map((path) => fs.readFile(path, "utf-8")), + const schemaFiles = await Promise.all( + this.config.graphqlSchemaDirs.map(async (d) => + fs.readdir(d, { recursive: true, withFileTypes: true }), + ), ); + const schemaPaths = schemaFiles + .flat() + .map((file) => path.resolve(file.parentPath, file.name)); + return Promise.all(schemaPaths.map((path) => fs.readFile(path, "utf-8"))); } getResolvers(): Resolvers { @@ -79,7 +83,7 @@ export class GraphQLServer { for (const instance of getResolverInstances()) { for (const info of getResolverInfos(instance)) { const resolver = this.makeResolver(instance, info); - assign(resolvers, info.typeName, resolver); + assignDeep(resolvers, info.typeName, resolver); } } return resolvers; diff --git a/packages/demo/codegen.graphql.ts b/packages/demo/codegen.graphql.ts index 1134456..eb13cec 100644 --- a/packages/demo/codegen.graphql.ts +++ b/packages/demo/codegen.graphql.ts @@ -13,6 +13,18 @@ const config: CodegenConfig = { "src/graphql.ts": { plugins: ["typescript", "typescript-operations"], }, + "src/graphql-sdk.ts": { + documents: "src/**/*.sdk.gql", + plugins: [ + "typescript", + "typescript-operations", + "typescript-graphql-request", + ], + config: { + noExport: true, + gqlImport: "graphql-request#gql", + }, + }, }, }; export default config; diff --git a/packages/demo/package.json b/packages/demo/package.json index fff5e17..1f19f18 100644 --- a/packages/demo/package.json +++ b/packages/demo/package.json @@ -34,11 +34,13 @@ "dependencies": { "@athenajs/core": "workspace:*", "@athenajs/utils": "workspace:*", + "graphql-request": "^6.1.0", "reflect-metadata": "^0.2.2" }, "devDependencies": { "@graphql-codegen/cli": "^5.0.2", "@graphql-codegen/typescript": "^4.0.6", + "@graphql-codegen/typescript-graphql-request": "^6.2.0", "@graphql-codegen/typescript-operations": "^4.2.0" } } diff --git a/packages/demo/src/config.test.ts b/packages/demo/src/config.test.ts index 95061f5..92061fb 100644 --- a/packages/demo/src/config.test.ts +++ b/packages/demo/src/config.test.ts @@ -1,4 +1,4 @@ -import { recursiveReaddir } from "@athenajs/utils"; +import fs from "node:fs/promises"; import { describe, expect, it } from "vitest"; import { Config } from "./config.js"; @@ -9,7 +9,9 @@ describe("Config", () => { it("should point to a dir containing graphql files", async () => { const files = ( await Promise.all( - config.graphqlSchemaDirs.map((dir) => recursiveReaddir(dir)), + config.graphqlSchemaDirs.map((dir) => + fs.readdir(dir, { recursive: true }), + ), ) ).flat(); expect(files.length > 0).toEqual(true); diff --git a/packages/demo/src/graphql-sdk.ts b/packages/demo/src/graphql-sdk.ts new file mode 100644 index 0000000..694a0c3 --- /dev/null +++ b/packages/demo/src/graphql-sdk.ts @@ -0,0 +1,118 @@ +import { GraphQLClient, RequestOptions } from "graphql-request"; +import { gql } from "graphql-request"; +type Maybe = T | undefined; +type InputMaybe = T | undefined; +type Exact = { [K in keyof T]: T[K] }; +type MakeOptional = Omit & { + [SubKey in K]?: Maybe; +}; +type MakeMaybe = Omit & { + [SubKey in K]: Maybe; +}; +type MakeEmpty = { + [_ in K]?: never; +}; +type Incremental = + | T + | { + [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; + }; +type GraphQLClientRequestHeaders = RequestOptions["requestHeaders"]; +/** All built-in and custom scalars, mapped to their actual values */ +type Scalars = { + ID: { input: string; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; +}; + +type IQuery = { + __typename?: "Query"; + hello: Scalars["String"]["output"]; + users: IUser[]; +}; + +type IUser = { + __typename?: "User"; + id: Scalars["ID"]["output"]; + username: Scalars["String"]["output"]; +}; + +type IHelloQueryVariables = Exact<{ [key: string]: never }>; + +type IHelloQuery = { __typename?: "Query"; hello: string }; + +type IGetUsersQueryVariables = Exact<{ [key: string]: never }>; + +type IGetUsersQuery = { + __typename?: "Query"; + users: Array<{ __typename?: "User"; id: string; username: string }>; +}; + +const HelloDocument = gql` + query hello { + hello +} + `; +const GetUsersDocument = gql` + query getUsers { + users { + id + username + } +} + `; + +export type SdkFunctionWrapper = ( + action: (requestHeaders?: Record) => Promise, + operationName: string, + operationType?: string, + variables?: any, +) => Promise; + +const defaultWrapper: SdkFunctionWrapper = ( + action, + _operationName, + _operationType, + _variables, +) => action(); + +export function getSdk( + client: GraphQLClient, + withWrapper: SdkFunctionWrapper = defaultWrapper, +) { + return { + hello( + variables?: IHelloQueryVariables, + requestHeaders?: GraphQLClientRequestHeaders, + ): Promise { + return withWrapper( + (wrappedRequestHeaders) => + client.request(HelloDocument, variables, { + ...requestHeaders, + ...wrappedRequestHeaders, + }), + "hello", + "query", + variables, + ); + }, + getUsers( + variables?: IGetUsersQueryVariables, + requestHeaders?: GraphQLClientRequestHeaders, + ): Promise { + return withWrapper( + (wrappedRequestHeaders) => + client.request(GetUsersDocument, variables, { + ...requestHeaders, + ...wrappedRequestHeaders, + }), + "getUsers", + "query", + variables, + ); + }, + }; +} +export type Sdk = ReturnType; diff --git a/packages/demo/src/hello/hello-controller.test.ts b/packages/demo/src/hello/hello-controller.test.ts index d0ad6ee..fdb9a06 100644 --- a/packages/demo/src/hello/hello-controller.test.ts +++ b/packages/demo/src/hello/hello-controller.test.ts @@ -5,7 +5,7 @@ describe("HelloController", () => { describe("hello()", () => { it("should return a polite, understated greeting", async () => { const expected = { hello: "Hello, world!" }; - await withTestApp(async (url) => { + await withTestApp(async (sdk, url) => { const res = await fetch(`${url}/hello`); expect(res.status).toEqual(200); expect(await res.json()).toEqual(expected); @@ -17,7 +17,7 @@ describe("HelloController", () => { it("should take a file and respond briskly", async () => { const body = new FormData(); body.set("file", new Blob(["Hello, world!"])); - await withTestApp(async (url) => { + await withTestApp(async (sdk, url) => { const res = await fetch(`${url}/hello`, { method: "POST", body, diff --git a/packages/demo/src/hello/hello.sdk.gql b/packages/demo/src/hello/hello.sdk.gql new file mode 100644 index 0000000..90a2ee2 --- /dev/null +++ b/packages/demo/src/hello/hello.sdk.gql @@ -0,0 +1,3 @@ +query hello { + hello +} diff --git a/packages/demo/src/main.test.ts b/packages/demo/src/main.test.ts index 3bb596b..10a74c2 100644 --- a/packages/demo/src/main.test.ts +++ b/packages/demo/src/main.test.ts @@ -3,15 +3,9 @@ import { withTestApp } from "./test-util.js"; describe("main", () => { it("should start a working GraphQL server", async () => { - await withTestApp(async (url) => { - const res = await fetch(`${url}/graphql`, { - method: "POST", - body: JSON.stringify({ query: "query { hello }" }), - headers: { - "Content-Type": "application/json", - }, - }).then((r) => r.json()); - expect(res).toEqual({ data: { hello: "hello, world!" } }); + await withTestApp(async (sdk) => { + const { hello } = await sdk.hello(); + expect(hello).toEqual("hello, world!"); }); }); }); diff --git a/packages/demo/src/test-util.ts b/packages/demo/src/test-util.ts index 659538a..5c3621c 100644 --- a/packages/demo/src/test-util.ts +++ b/packages/demo/src/test-util.ts @@ -1,15 +1,18 @@ import { randomInt } from "node:crypto"; -import { Application, container } from "@athenajs/core"; +import { container } from "@athenajs/core"; +import { GraphQLClient } from "graphql-request"; +import { Sdk, getSdk } from "./graphql-sdk.js"; import { main } from "./main.js"; export const withTestApp = async ( - callback: (url: string, app: Application) => Promise, + callback: (sdk: Sdk, url: string) => Promise, ) => { const port = randomInt(16384, 65536).toString(); process.env.HTTP_PORT = port; const app = await main(); + const url = `http://localhost:${port}`; try { - await callback(`http://localhost:${port}`, app); + await callback(getSdk(new GraphQLClient(`${url}/graphql`)), url); } finally { await app.stop(); container.clearInstances(); diff --git a/packages/demo/src/user/user-resolver.test.ts b/packages/demo/src/user/user-resolver.test.ts index 54b44c1..c839ec8 100644 --- a/packages/demo/src/user/user-resolver.test.ts +++ b/packages/demo/src/user/user-resolver.test.ts @@ -1,22 +1,42 @@ +import { createHash } from "node:crypto"; +import { container } from "@athenajs/core"; import { describe, expect, it } from "vitest"; +import { withTestApp } from "../test-util.js"; import { UserResolver } from "./user-resolver.js"; +import { UserService } from "./user-service.js"; + +const ids = { + foo: createHash("md5").update("foo").digest("hex"), + bar: createHash("md5").update("bar").digest("hex"), +}; describe("UserResolver", () => { - const userResolver = new UserResolver(); describe("users()", () => { - it("should return some users with usernames", async () => { - const expected = [{ username: "foo" }, { username: "bar" }]; - const actual = await userResolver.users(); - expect(actual).toEqual(expected); + it("should resolve IDs", async () => { + await withTestApp(async (sdk) => { + const { users } = await sdk.getUsers(); + expect(users).toEqual([ + { + id: ids.foo, + username: "foo", + }, + { + id: ids.bar, + username: "bar", + }, + ]); + }); }); - }); - describe("#id", () => { - it("should return md5 hashes of usernames", async () => { - // md5 of my name. this is a demo - const expected = ["534b44a19bf18d20b71ecc4eb77c572f"]; - const actual = await userResolver.id([{ username: "alex" }]); - expect(actual).toEqual(expected); + it("should return mocked data", async () => { + container.register(UserService, { + useValue: { + getMany: () => Promise.resolve([{ username: "mocked" }]), + }, + }); + const resolver = container.resolve(UserResolver); + const users = await resolver.users(); + expect(users).toEqual([{ username: "mocked" }]); }); }); }); diff --git a/packages/demo/src/user/user-resolver.ts b/packages/demo/src/user/user-resolver.ts index f799583..6f54c18 100644 --- a/packages/demo/src/user/user-resolver.ts +++ b/packages/demo/src/user/user-resolver.ts @@ -1,16 +1,19 @@ import crypto from "node:crypto"; import { resolveField, resolveQuery, resolver } from "@athenajs/core"; import { IUser } from "../graphql.js"; +import { UserService } from "./user-service.js"; @resolver() export class UserResolver { + constructor(private readonly userService: UserService) {} + @resolveQuery() - users() { - return Promise.resolve([{ username: "foo" }, { username: "bar" }]); + async users() { + return await this.userService.getMany(); } @resolveField("User.id", true) - async id(users: Omit[]): Promise { + async id(users: IUser[]): Promise { return users.map((u) => crypto.createHash("md5").update(u.username).digest("hex"), ); diff --git a/packages/demo/src/user/user-service.test.ts b/packages/demo/src/user/user-service.test.ts new file mode 100644 index 0000000..4e506ca --- /dev/null +++ b/packages/demo/src/user/user-service.test.ts @@ -0,0 +1,20 @@ +import { container } from "@athenajs/core"; +import { afterEach, beforeEach, describe, expect, it } from "vitest"; +import { UserService } from "./user-service.js"; + +describe("UserService", () => { + let service: UserService; + beforeEach(() => { + service = container.resolve(UserService); + }); + afterEach(() => { + container.clearInstances(); + }); + + describe("getMany()", () => { + it("should return users", async () => { + const users = await service.getMany(); + expect(users).toEqual([{ username: "foo" }, { username: "bar" }]); + }); + }); +}); diff --git a/packages/demo/src/user/user-service.ts b/packages/demo/src/user/user-service.ts new file mode 100644 index 0000000..6f931c5 --- /dev/null +++ b/packages/demo/src/user/user-service.ts @@ -0,0 +1,8 @@ +import { injectable } from "@athenajs/core"; + +@injectable() +export class UserService { + getMany() { + return Promise.resolve([{ username: "foo" }, { username: "bar" }]); + } +} diff --git a/packages/demo/src/user/user.sdk.gql b/packages/demo/src/user/user.sdk.gql new file mode 100644 index 0000000..15243f5 --- /dev/null +++ b/packages/demo/src/user/user.sdk.gql @@ -0,0 +1,6 @@ +query getUsers { + users { + id + username + } +} diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index 6f4745f..7ac64df 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -4,5 +4,6 @@ "outDir": "dist", "experimentalDecorators": false, "emitDecoratorMetadata": false - } + }, + "include": ["src"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bb05d72..86da013 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -84,6 +84,9 @@ importers: '@athenajs/utils': specifier: workspace:* version: link:../utils + graphql-request: + specifier: ^6.1.0 + version: 6.1.0(graphql@16.8.1) reflect-metadata: specifier: ^0.2.2 version: 0.2.2 @@ -94,6 +97,9 @@ importers: '@graphql-codegen/typescript': specifier: ^4.0.6 version: 4.0.6(graphql@16.8.1) + '@graphql-codegen/typescript-graphql-request': + specifier: ^6.2.0 + version: 6.2.0(graphql-request@6.1.0(graphql@16.8.1))(graphql-tag@2.12.6(graphql@16.8.1))(graphql@16.8.1) '@graphql-codegen/typescript-operations': specifier: ^4.2.0 version: 4.2.0(graphql@16.8.1) @@ -773,6 +779,16 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + '@graphql-codegen/plugin-helpers@2.7.2': + resolution: {integrity: sha512-kln2AZ12uii6U59OQXdjLk5nOlh1pHis1R98cDZGFnfaiAbX9V3fxcZ1MMJkB7qFUymTALzyjZoXXdyVmPMfRg==} + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + + '@graphql-codegen/plugin-helpers@3.1.2': + resolution: {integrity: sha512-emOQiHyIliVOIjKVKdsI5MXj312zmRDwmHpyUTZMjfpvxq/UVAHUJIVdVf+lnjjrI+LXBTgMlTWTgHQfmICxjg==} + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + '@graphql-codegen/plugin-helpers@5.0.3': resolution: {integrity: sha512-yZ1rpULIWKBZqCDlvGIJRSyj1B2utkEdGmXZTBT/GVayP4hyRYlkd36AJV/LfEsVD8dnsKL5rLz2VTYmRNlJ5Q==} peerDependencies: @@ -788,6 +804,14 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + '@graphql-codegen/typescript-graphql-request@6.2.0': + resolution: {integrity: sha512-nkp5tr4PrC/+2QkQqi+IB+bc7AavUnUvXPW8MC93HZRvwfMGy6m2Oo7b9JCPZ3vhNpqT2VDWOn/zIZXKz6zJAw==} + engines: {node: '>= 16.0.0'} + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + graphql-request: ^6.0.0 + graphql-tag: ^2.0.0 + '@graphql-codegen/typescript-operations@4.2.0': resolution: {integrity: sha512-lmuwYb03XC7LNRS8oo9M4/vlOrq/wOKmTLBHlltK2YJ1BO/4K/Q9Jdv/jDmJpNydHVR1fmeF4wAfsIp1f9JibA==} peerDependencies: @@ -798,6 +822,11 @@ packages: peerDependencies: graphql: ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + '@graphql-codegen/visitor-plugin-common@2.13.1': + resolution: {integrity: sha512-mD9ufZhDGhyrSaWQGrU1Q1c5f01TeWtSWy/cDwXYjJcHIj1Y/DG2x0tOflEfCvh5WcnmHNIw4lzDsg1W7iFJEg==} + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + '@graphql-codegen/visitor-plugin-common@5.1.0': resolution: {integrity: sha512-eamQxtA9bjJqI2lU5eYoA1GbdMIRT2X8m8vhWYsVQVWD3qM7sx/IqJU0kx0J3Vd4/CSd36BzL6RKwksibytDIg==} peerDependencies: @@ -910,6 +939,11 @@ packages: peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + '@graphql-tools/optimize@1.4.0': + resolution: {integrity: sha512-dJs/2XvZp+wgHH8T5J2TqptT9/6uVzIYvA6uFACha+ufvdMBedkfR4b4GbT8jAKLRARiqRTxy3dctnwkTM2tdw==} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + '@graphql-tools/optimize@2.0.0': resolution: {integrity: sha512-nhdT+CRGDZ+bk68ic+Jw1OZ99YCDIKYA5AlVAnBHJvMawSx9YQqQAIj4refNc1/LRieGiuWvhbG3jvPVYho0Dg==} engines: {node: '>=16.0.0'} @@ -922,6 +956,11 @@ packages: peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + '@graphql-tools/relay-operation-optimizer@6.5.18': + resolution: {integrity: sha512-mc5VPyTeV+LwiM+DNvoDQfPqwQYhPV/cl5jOBjTgSniyaq8/86aODfMkrE2OduhQ5E00hqrkuL2Fdrgk0w1QJg==} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + '@graphql-tools/relay-operation-optimizer@7.0.0': resolution: {integrity: sha512-UNlJi5y3JylhVWU4MBpL0Hun4Q7IoJwv9xYtmAz+CgRa066szzY7dcuPfxrA7cIGgG/Q6TVsKsYaiF4OHPs1Fw==} engines: {node: '>=16.0.0'} @@ -951,6 +990,11 @@ packages: peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + '@graphql-tools/utils@8.13.1': + resolution: {integrity: sha512-qIh9yYpdUFmctVqovwMdheVNJqFh+DQNWIhX87FJStfXYnmweBUDATok9fWPleKeFwxnW8IapKmY8m8toJEkAw==} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + '@graphql-tools/utils@9.2.1': resolution: {integrity: sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==} peerDependencies: @@ -1529,6 +1573,9 @@ packages: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} + change-case-all@1.0.14: + resolution: {integrity: sha512-CWVm2uT7dmSHdO/z1CXT/n47mWonyypzBbuCy5tN7uMg22BsfkhwT6oHmFCAk+gL1LOOxhdbB9SZz3J1KTY3gA==} + change-case-all@1.0.15: resolution: {integrity: sha512-3+GIFhk3sNuvFAJKU46o26OdzudQlPNBCu1ZQi3cMeMHhty1bhDxu2WrEilVNYaGvqUtR1VSigFcJOiS13dRhQ==} @@ -2952,6 +2999,9 @@ packages: tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + tslib@2.4.1: + resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} + tslib@2.6.0: resolution: {integrity: sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==} @@ -3974,6 +4024,26 @@ snapshots: - encoding - supports-color + '@graphql-codegen/plugin-helpers@2.7.2(graphql@16.8.1)': + dependencies: + '@graphql-tools/utils': 8.13.1(graphql@16.8.1) + change-case-all: 1.0.14 + common-tags: 1.8.2 + graphql: 16.8.1 + import-from: 4.0.0 + lodash: 4.17.21 + tslib: 2.4.1 + + '@graphql-codegen/plugin-helpers@3.1.2(graphql@16.8.1)': + dependencies: + '@graphql-tools/utils': 9.2.1(graphql@16.8.1) + change-case-all: 1.0.15 + common-tags: 1.8.2 + graphql: 16.8.1 + import-from: 4.0.0 + lodash: 4.17.21 + tslib: 2.4.1 + '@graphql-codegen/plugin-helpers@5.0.3(graphql@16.8.1)': dependencies: '@graphql-tools/utils': 10.0.1(graphql@16.8.1) @@ -4003,6 +4073,19 @@ snapshots: - encoding - supports-color + '@graphql-codegen/typescript-graphql-request@6.2.0(graphql-request@6.1.0(graphql@16.8.1))(graphql-tag@2.12.6(graphql@16.8.1))(graphql@16.8.1)': + dependencies: + '@graphql-codegen/plugin-helpers': 3.1.2(graphql@16.8.1) + '@graphql-codegen/visitor-plugin-common': 2.13.1(graphql@16.8.1) + auto-bind: 4.0.0 + graphql: 16.8.1 + graphql-request: 6.1.0(graphql@16.8.1) + graphql-tag: 2.12.6(graphql@16.8.1) + tslib: 2.6.0 + transitivePeerDependencies: + - encoding + - supports-color + '@graphql-codegen/typescript-operations@4.2.0(graphql@16.8.1)': dependencies: '@graphql-codegen/plugin-helpers': 5.0.3(graphql@16.8.1) @@ -4027,6 +4110,23 @@ snapshots: - encoding - supports-color + '@graphql-codegen/visitor-plugin-common@2.13.1(graphql@16.8.1)': + dependencies: + '@graphql-codegen/plugin-helpers': 2.7.2(graphql@16.8.1) + '@graphql-tools/optimize': 1.4.0(graphql@16.8.1) + '@graphql-tools/relay-operation-optimizer': 6.5.18(graphql@16.8.1) + '@graphql-tools/utils': 8.13.1(graphql@16.8.1) + auto-bind: 4.0.0 + change-case-all: 1.0.14 + dependency-graph: 0.11.0 + graphql: 16.8.1 + graphql-tag: 2.12.6(graphql@16.8.1) + parse-filepath: 1.0.2 + tslib: 2.4.1 + transitivePeerDependencies: + - encoding + - supports-color + '@graphql-codegen/visitor-plugin-common@5.1.0(graphql@16.8.1)': dependencies: '@graphql-codegen/plugin-helpers': 5.0.3(graphql@16.8.1) @@ -4226,6 +4326,11 @@ snapshots: graphql: 16.8.1 tslib: 2.6.0 + '@graphql-tools/optimize@1.4.0(graphql@16.8.1)': + dependencies: + graphql: 16.8.1 + tslib: 2.6.0 + '@graphql-tools/optimize@2.0.0(graphql@16.8.1)': dependencies: graphql: 16.8.1 @@ -4259,6 +4364,16 @@ snapshots: - supports-color - utf-8-validate + '@graphql-tools/relay-operation-optimizer@6.5.18(graphql@16.8.1)': + dependencies: + '@ardatan/relay-compiler': 12.0.0(graphql@16.8.1) + '@graphql-tools/utils': 9.2.1(graphql@16.8.1) + graphql: 16.8.1 + tslib: 2.6.0 + transitivePeerDependencies: + - encoding + - supports-color + '@graphql-tools/relay-operation-optimizer@7.0.0(graphql@16.8.1)': dependencies: '@ardatan/relay-compiler': 12.0.0(graphql@16.8.1) @@ -4313,6 +4428,11 @@ snapshots: graphql: 16.8.1 tslib: 2.6.0 + '@graphql-tools/utils@8.13.1(graphql@16.8.1)': + dependencies: + graphql: 16.8.1 + tslib: 2.6.0 + '@graphql-tools/utils@9.2.1(graphql@16.8.1)': dependencies: '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.1) @@ -4931,6 +5051,19 @@ snapshots: ansi-styles: 4.3.0 supports-color: 7.2.0 + change-case-all@1.0.14: + dependencies: + change-case: 4.1.2 + is-lower-case: 2.0.2 + is-upper-case: 2.0.2 + lower-case: 2.0.2 + lower-case-first: 2.0.2 + sponge-case: 1.0.1 + swap-case: 2.0.2 + title-case: 3.0.3 + upper-case: 2.0.2 + upper-case-first: 2.0.2 + change-case-all@1.0.15: dependencies: change-case: 4.1.2 @@ -6417,6 +6550,8 @@ snapshots: tslib@1.14.1: {} + tslib@2.4.1: {} + tslib@2.6.0: {} tsyringe@4.8.0: