From 1999b8446792088b43f09c901fc1703842b237e4 Mon Sep 17 00:00:00 2001 From: Karol Rzotki <52164548+krzotki@users.noreply.github.com> Date: Wed, 13 Nov 2024 11:34:59 +0100 Subject: [PATCH] fix(generators): Remove apollo by default (#30) --- packages/create/bin/create-gene-workspace.js | 1 - .../ioc/serviceClientsContainer.ts__tmpl__ | 31 +++++++++---------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/packages/create/bin/create-gene-workspace.js b/packages/create/bin/create-gene-workspace.js index 18423d6..a5c8aa4 100755 --- a/packages/create/bin/create-gene-workspace.js +++ b/packages/create/bin/create-gene-workspace.js @@ -102,7 +102,6 @@ async function runCommands() { 'css-loader@3.6.0', 'sass@1.55.0', 'sass-loader@9.0.2', - '@apollo/client@3.6.9', 'classnames@2.5.1', ]); diff --git a/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/ioc/serviceClientsContainer.ts__tmpl__ b/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/ioc/serviceClientsContainer.ts__tmpl__ index be62907..ebacb44 100644 --- a/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/ioc/serviceClientsContainer.ts__tmpl__ +++ b/packages/gene-tools/src/generators/e2e-providers-generator/files/lib/ioc/serviceClientsContainer.ts__tmpl__ @@ -1,31 +1,30 @@ -import { Container } from 'inversify'; -import { factory, Factory } from '@brainly-gene/core'; -import { ServiceTypes } from '@brainly-gene/core'; -import { QueryClient } from '@tanstack/react-query'; -import { ApolloClient, InMemoryCache, NormalizedCacheObject } from '@apollo/client'; +import { Container } from "inversify"; +import { factory, Factory } from "@brainly-gene/core"; +import { ServiceTypes } from "@brainly-gene/core"; +import { QueryClient } from "@tanstack/react-query"; +// import { ApolloClient, InMemoryCache, NormalizedCacheObject } from '@apollo/client'; export function useServiceClientsContainer() { - const apolloClient = new ApolloClient({ - uri: 'https://mockurl.com', - cache: new InMemoryCache(), - ssrMode: true, - }); + // const apolloClient = new ApolloClient({ + // uri: 'https://mockurl.com', + // cache: new InMemoryCache(), + // ssrMode: true, + // }); const queryClient = new QueryClient(); const clients = { [ServiceTypes.reactQuery]: () => { return queryClient; }, - [ServiceTypes.apollo]: () => { - return apolloClient; - }, + // [ServiceTypes.apollo]: () => { + // return apolloClient; + // }, }; const container = new Container(); container - .bind>>( - 'serviceFactory' - ) + // .bind>>( + .bind>("serviceFactory") .toFunction(factory(clients)); return container;