diff --git a/packages/backend/src/graphql/queries/get-automatisch-info.ts b/packages/backend/src/graphql/queries/get-automatisch-info.ts new file mode 100644 index 00000000..43937e5f --- /dev/null +++ b/packages/backend/src/graphql/queries/get-automatisch-info.ts @@ -0,0 +1,9 @@ +import appConfig from '../../config/app'; + +const getAutomatischInfo = async () => { + return { + isCloud: appConfig.isCloud, + }; +}; + +export default getAutomatischInfo; diff --git a/packages/backend/src/graphql/queries/get-license.ee.ts b/packages/backend/src/graphql/queries/get-license.ee.ts deleted file mode 100644 index 94832808..00000000 --- a/packages/backend/src/graphql/queries/get-license.ee.ts +++ /dev/null @@ -1,11 +0,0 @@ -import checkLicense from '../../helpers/check-license.ee'; - -const getLicense = async () => { - const license = await checkLicense(); - - return { - type: license ? 'ee' : 'ce', - }; -}; - -export default getLicense; diff --git a/packages/backend/src/graphql/query-resolvers.ts b/packages/backend/src/graphql/query-resolvers.ts index 48617d99..d1d3a903 100644 --- a/packages/backend/src/graphql/query-resolvers.ts +++ b/packages/backend/src/graphql/query-resolvers.ts @@ -11,7 +11,7 @@ import getExecutionSteps from './queries/get-execution-steps'; import getDynamicData from './queries/get-dynamic-data'; import getDynamicFields from './queries/get-dynamic-fields'; import getCurrentUser from './queries/get-current-user'; -import getLicense from './queries/get-license.ee'; +import getAutomatischInfo from './queries/get-automatisch-info'; import healthcheck from './queries/healthcheck'; const queryResolvers = { @@ -28,7 +28,7 @@ const queryResolvers = { getDynamicData, getDynamicFields, getCurrentUser, - getLicense, + getAutomatischInfo, healthcheck, }; diff --git a/packages/backend/src/graphql/schema.graphql b/packages/backend/src/graphql/schema.graphql index 7e02269e..97ee91f6 100644 --- a/packages/backend/src/graphql/schema.graphql +++ b/packages/backend/src/graphql/schema.graphql @@ -34,7 +34,7 @@ type Query { parameters: JSONObject ): [SubstepArgument] getCurrentUser: User - getLicense: GetLicense + getAutomatischInfo: GetAutomatischInfo healthcheck: AppHealth } @@ -463,8 +463,8 @@ type AppHealth { version: String } -type GetLicense { - type: String +type GetAutomatischInfo { + isCloud: String } schema {