feat: Introduce getLicense graphQL query
This commit is contained in:
11
packages/backend/src/graphql/queries/get-license.ee.ts
Normal file
11
packages/backend/src/graphql/queries/get-license.ee.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import checkLicense from '../../helpers/checkLicense.ee';
|
||||
|
||||
const getLicense = async () => {
|
||||
const license = await checkLicense();
|
||||
|
||||
return {
|
||||
type: license ? 'ee' : 'ce',
|
||||
};
|
||||
};
|
||||
|
||||
export default getLicense;
|
@@ -10,6 +10,7 @@ import getExecutions from './queries/get-executions';
|
||||
import getExecutionSteps from './queries/get-execution-steps';
|
||||
import getDynamicData from './queries/get-dynamic-data';
|
||||
import getCurrentUser from './queries/get-current-user';
|
||||
import getLicense from './queries/get-license.ee';
|
||||
import healthcheck from './queries/healthcheck';
|
||||
|
||||
const queryResolvers = {
|
||||
@@ -25,6 +26,7 @@ const queryResolvers = {
|
||||
getExecutionSteps,
|
||||
getDynamicData,
|
||||
getCurrentUser,
|
||||
getLicense,
|
||||
healthcheck,
|
||||
};
|
||||
|
||||
|
@@ -29,6 +29,7 @@ type Query {
|
||||
parameters: JSONObject
|
||||
): JSONObject
|
||||
getCurrentUser: User
|
||||
getLicense: GetLicense
|
||||
healthcheck: AppHealth
|
||||
}
|
||||
|
||||
@@ -453,6 +454,10 @@ type AppHealth {
|
||||
version: String
|
||||
}
|
||||
|
||||
type GetLicense {
|
||||
type: String
|
||||
}
|
||||
|
||||
schema {
|
||||
query: Query
|
||||
mutation: Mutation
|
||||
|
Reference in New Issue
Block a user