feat: Introduce getLicense graphQL query

This commit is contained in:
Faruk AYDIN
2023-02-14 22:01:34 +01:00
parent 1847ad5622
commit 1dfb22d02e
7 changed files with 67 additions and 4 deletions

View 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;

View File

@@ -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,
};

View File

@@ -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