refactor: Use graphql schema directly with graphql-tools library
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
96cca96bff
commit
9926e5589e
@@ -18,6 +18,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@automatisch/web": "0.1.0",
|
"@automatisch/web": "0.1.0",
|
||||||
|
"@graphql-tools/graphql-file-loader": "^7.3.4",
|
||||||
|
"@graphql-tools/load": "^7.5.2",
|
||||||
"@octokit/oauth-methods": "^1.2.6",
|
"@octokit/oauth-methods": "^1.2.6",
|
||||||
"ajv-formats": "^2.1.1",
|
"ajv-formats": "^2.1.1",
|
||||||
"axios": "0.24.0",
|
"axios": "0.24.0",
|
||||||
@@ -34,6 +36,7 @@
|
|||||||
"googleapis": "89.0.0",
|
"googleapis": "89.0.0",
|
||||||
"graphql-middleware": "^6.1.15",
|
"graphql-middleware": "^6.1.15",
|
||||||
"graphql-shield": "^7.5.0",
|
"graphql-shield": "^7.5.0",
|
||||||
|
"graphql-tools": "^8.2.0",
|
||||||
"graphql-type-json": "^0.3.2",
|
"graphql-type-json": "^0.3.2",
|
||||||
"http-errors": "~1.6.3",
|
"http-errors": "~1.6.3",
|
||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^8.5.1",
|
||||||
|
@@ -1,10 +0,0 @@
|
|||||||
import { GraphQLSchema } from 'graphql';
|
|
||||||
import rootQuery from './root-query';
|
|
||||||
import rootMutation from './root-mutation';
|
|
||||||
|
|
||||||
const graphQLSchema = new GraphQLSchema({
|
|
||||||
query: rootQuery,
|
|
||||||
mutation: rootMutation
|
|
||||||
});
|
|
||||||
|
|
||||||
export default graphQLSchema;
|
|
@@ -1,4 +1,3 @@
|
|||||||
import { GraphQLObjectType } from 'graphql';
|
|
||||||
import createConnection from './mutations/create-connection';
|
import createConnection from './mutations/create-connection';
|
||||||
import createAuthData from './mutations/create-auth-data';
|
import createAuthData from './mutations/create-auth-data';
|
||||||
import updateConnection from './mutations/update-connection';
|
import updateConnection from './mutations/update-connection';
|
||||||
@@ -10,14 +9,11 @@ import updateFlow from './mutations/update-flow';
|
|||||||
import executeFlow from './mutations/execute-flow';
|
import executeFlow from './mutations/execute-flow';
|
||||||
import deleteFlow from './mutations/delete-flow';
|
import deleteFlow from './mutations/delete-flow';
|
||||||
import createStep from './mutations/create-step';
|
import createStep from './mutations/create-step';
|
||||||
import deleteStep from './mutations/delete-step';
|
|
||||||
import updateStep from './mutations/update-step';
|
import updateStep from './mutations/update-step';
|
||||||
|
import deleteStep from './mutations/delete-step';
|
||||||
import login from './mutations/login';
|
import login from './mutations/login';
|
||||||
|
|
||||||
const rootMutation = new GraphQLObjectType({
|
const mutationResolvers = {
|
||||||
name: 'Mutation',
|
|
||||||
fields: {
|
|
||||||
createConnection,
|
createConnection,
|
||||||
createAuthData,
|
createAuthData,
|
||||||
updateConnection,
|
updateConnection,
|
||||||
@@ -26,13 +22,12 @@ const rootMutation = new GraphQLObjectType({
|
|||||||
deleteConnection,
|
deleteConnection,
|
||||||
createFlow,
|
createFlow,
|
||||||
updateFlow,
|
updateFlow,
|
||||||
|
executeFlow,
|
||||||
deleteFlow,
|
deleteFlow,
|
||||||
createStep,
|
createStep,
|
||||||
updateStep,
|
updateStep,
|
||||||
deleteStep,
|
deleteStep,
|
||||||
executeFlow,
|
|
||||||
login,
|
login,
|
||||||
},
|
};
|
||||||
});
|
|
||||||
|
|
||||||
export default rootMutation;
|
export default mutationResolvers;
|
@@ -1,17 +1,16 @@
|
|||||||
import { GraphQLNonNull, GraphQLString } from 'graphql';
|
import Context from '../../types/express/context';
|
||||||
import authLinkType from '../types/auth-link';
|
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
import App from '../../models/app';
|
import App from '../../models/app';
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
id: string;
|
id: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const createAuthDataResolver = async (
|
const createAuthData = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
const connection = await req.currentUser
|
const connection = await context.currentUser
|
||||||
.$relatedQuery('connections')
|
.$relatedQuery('connections')
|
||||||
.findOne({
|
.findOne({
|
||||||
id: params.id,
|
id: params.id,
|
||||||
@@ -38,13 +37,4 @@ const createAuthDataResolver = async (
|
|||||||
return authLink;
|
return authLink;
|
||||||
};
|
};
|
||||||
|
|
||||||
const createAuthData = {
|
|
||||||
type: authLinkType,
|
|
||||||
args: {
|
|
||||||
id: { type: GraphQLNonNull(GraphQLString) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
createAuthDataResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default createAuthData;
|
export default createAuthData;
|
||||||
|
@@ -1,22 +1,21 @@
|
|||||||
import { GraphQLNonNull } from 'graphql';
|
|
||||||
import App from '../../models/app';
|
import App from '../../models/app';
|
||||||
import connectionType from '../types/connection';
|
import Context from '../../types/express/context';
|
||||||
import availableAppsEnumType from '../types/available-apps-enum-type';
|
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
import { GraphQLJSONObject } from 'graphql-type-json';
|
|
||||||
import { IJSONObject } from '@automatisch/types';
|
import { IJSONObject } from '@automatisch/types';
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
key: string;
|
key: string;
|
||||||
formattedData: IJSONObject;
|
formattedData: IJSONObject;
|
||||||
};
|
};
|
||||||
const createConnectionResolver = async (
|
const createConnection = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
const app = App.findOneByKey(params.key);
|
const app = App.findOneByKey(params.key);
|
||||||
|
|
||||||
const connection = await req.currentUser.$relatedQuery('connections').insert({
|
const connection = await context.currentUser
|
||||||
|
.$relatedQuery('connections')
|
||||||
|
.insert({
|
||||||
key: params.key,
|
key: params.key,
|
||||||
formattedData: params.formattedData,
|
formattedData: params.formattedData,
|
||||||
});
|
});
|
||||||
@@ -27,14 +26,4 @@ const createConnectionResolver = async (
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const createConnection = {
|
|
||||||
type: connectionType,
|
|
||||||
args: {
|
|
||||||
key: { type: GraphQLNonNull(availableAppsEnumType) },
|
|
||||||
formattedData: { type: GraphQLNonNull(GraphQLJSONObject) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
createConnectionResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default createConnection;
|
export default createConnection;
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
import Step from '../../models/step';
|
import Step from '../../models/step';
|
||||||
import flowType, { flowInputType } from '../types/flow';
|
import Context from '../../types/express/context';
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
input: {
|
input: {
|
||||||
@@ -8,13 +7,14 @@ type Params = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const createFlowResolver = async (
|
const createFlow = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
const appKey = params?.input?.triggerAppKey;
|
const appKey = params?.input?.triggerAppKey;
|
||||||
|
|
||||||
const flow = await req.currentUser.$relatedQuery('flows').insert({
|
const flow = await context.currentUser.$relatedQuery('flows').insert({
|
||||||
name: 'Name your flow',
|
name: 'Name your flow',
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -28,13 +28,4 @@ const createFlowResolver = async (
|
|||||||
return flow;
|
return flow;
|
||||||
};
|
};
|
||||||
|
|
||||||
const createFlow = {
|
|
||||||
type: flowType,
|
|
||||||
args: {
|
|
||||||
input: { type: flowInputType },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
createFlowResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default createFlow;
|
export default createFlow;
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
import { GraphQLNonNull } from 'graphql';
|
import Context from '../../types/express/context';
|
||||||
import stepType, { stepInputType } from '../types/step';
|
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
input: {
|
input: {
|
||||||
@@ -18,13 +16,14 @@ type Params = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const createStepResolver = async (
|
const createStep = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
const { input } = params;
|
const { input } = params;
|
||||||
|
|
||||||
const flow = await req.currentUser
|
const flow = await context.currentUser
|
||||||
.$relatedQuery('flows')
|
.$relatedQuery('flows')
|
||||||
.findOne({
|
.findOne({
|
||||||
id: input.flow.id,
|
id: input.flow.id,
|
||||||
@@ -61,13 +60,4 @@ const createStepResolver = async (
|
|||||||
return step;
|
return step;
|
||||||
};
|
};
|
||||||
|
|
||||||
const createStep = {
|
|
||||||
type: stepType,
|
|
||||||
args: {
|
|
||||||
input: { type: new GraphQLNonNull(stepInputType) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
createStepResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default createStep;
|
export default createStep;
|
||||||
|
@@ -1,15 +1,15 @@
|
|||||||
import { GraphQLString, GraphQLNonNull, GraphQLBoolean } from 'graphql';
|
import Context from '../../types/express/context';
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
id: string;
|
id: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteConnectionResolver = async (
|
const deleteConnection = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
await req.currentUser
|
await context.currentUser
|
||||||
.$relatedQuery('connections')
|
.$relatedQuery('connections')
|
||||||
.delete()
|
.delete()
|
||||||
.findOne({
|
.findOne({
|
||||||
@@ -20,13 +20,4 @@ const deleteConnectionResolver = async (
|
|||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteConnection = {
|
|
||||||
type: GraphQLBoolean,
|
|
||||||
args: {
|
|
||||||
id: { type: GraphQLNonNull(GraphQLString) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
deleteConnectionResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default deleteConnection;
|
export default deleteConnection;
|
||||||
|
@@ -1,15 +1,15 @@
|
|||||||
import { GraphQLString, GraphQLNonNull, GraphQLBoolean } from 'graphql';
|
import Context from '../../types/express/context';
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
id: string;
|
id: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteFlowResolver = async (
|
const deleteFlow = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
await req.currentUser
|
await context.currentUser
|
||||||
.$relatedQuery('flows')
|
.$relatedQuery('flows')
|
||||||
.delete()
|
.delete()
|
||||||
.findOne({
|
.findOne({
|
||||||
@@ -20,13 +20,4 @@ const deleteFlowResolver = async (
|
|||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteFlow = {
|
|
||||||
type: GraphQLBoolean,
|
|
||||||
args: {
|
|
||||||
id: { type: GraphQLNonNull(GraphQLString) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
deleteFlowResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default deleteFlow;
|
export default deleteFlow;
|
||||||
|
@@ -1,16 +1,15 @@
|
|||||||
import { GraphQLString, GraphQLNonNull } from 'graphql';
|
import Context from '../../types/express/context';
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
import stepType from '../types/step';
|
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
id: string;
|
id: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteStepResolver = async (
|
const deleteStep = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
const step = await req.currentUser
|
const step = await context.currentUser
|
||||||
.$relatedQuery('steps')
|
.$relatedQuery('steps')
|
||||||
.withGraphFetched('flow')
|
.withGraphFetched('flow')
|
||||||
.findOne({
|
.findOne({
|
||||||
@@ -40,13 +39,4 @@ const deleteStepResolver = async (
|
|||||||
return step;
|
return step;
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteStep = {
|
|
||||||
type: stepType,
|
|
||||||
args: {
|
|
||||||
id: { type: GraphQLNonNull(GraphQLString) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
deleteStepResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default deleteStep;
|
export default deleteStep;
|
||||||
|
@@ -1,17 +1,17 @@
|
|||||||
import { GraphQLString, GraphQLNonNull } from 'graphql';
|
import Context from '../../types/express/context';
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
import executeFlowType from '../types/execute-flow';
|
|
||||||
import Processor from '../../services/processor';
|
import Processor from '../../services/processor';
|
||||||
import processorQueue from '../../queues/processor';
|
import processorQueue from '../../queues/processor';
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
stepId: string;
|
stepId: string;
|
||||||
};
|
};
|
||||||
const executeFlowResolver = async (
|
|
||||||
|
const executeFlow = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
): Promise<any> => {
|
) => {
|
||||||
const step = await req.currentUser
|
const step = await context.currentUser
|
||||||
.$relatedQuery('steps')
|
.$relatedQuery('steps')
|
||||||
.withGraphFetched('connection')
|
.withGraphFetched('connection')
|
||||||
.findOne({
|
.findOne({
|
||||||
@@ -35,13 +35,4 @@ const executeFlowResolver = async (
|
|||||||
return { data, step };
|
return { data, step };
|
||||||
};
|
};
|
||||||
|
|
||||||
const executeFlow = {
|
|
||||||
type: executeFlowType,
|
|
||||||
args: {
|
|
||||||
stepId: { type: GraphQLNonNull(GraphQLString) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
executeFlowResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default executeFlow;
|
export default executeFlow;
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
import { GraphQLString, GraphQLNonNull } from 'graphql';
|
|
||||||
import User from '../../models/user';
|
import User from '../../models/user';
|
||||||
import authType from '../types/auth';
|
|
||||||
import jwt from 'jsonwebtoken';
|
import jwt from 'jsonwebtoken';
|
||||||
import appConfig from '../../config/app';
|
import appConfig from '../../config/app';
|
||||||
|
|
||||||
@@ -9,7 +7,7 @@ type Params = {
|
|||||||
password: string;
|
password: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const loginResolver = async (params: Params) => {
|
const login = async (_parent: unknown, params: Params) => {
|
||||||
const user = await User.query().findOne({
|
const user = await User.query().findOne({
|
||||||
email: params.email,
|
email: params.email,
|
||||||
});
|
});
|
||||||
@@ -23,13 +21,4 @@ const loginResolver = async (params: Params) => {
|
|||||||
throw new Error('User could not be found.');
|
throw new Error('User could not be found.');
|
||||||
};
|
};
|
||||||
|
|
||||||
const login = {
|
|
||||||
type: authType,
|
|
||||||
args: {
|
|
||||||
email: { type: GraphQLNonNull(GraphQLString) },
|
|
||||||
password: { type: GraphQLNonNull(GraphQLString) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: any) => loginResolver(params),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default login;
|
export default login;
|
||||||
|
@@ -1,16 +1,15 @@
|
|||||||
import { GraphQLString, GraphQLNonNull } from 'graphql';
|
import Context from '../../types/express/context';
|
||||||
import connectionType from '../types/connection';
|
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
id: string;
|
id: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const resetConnectionResolver = async (
|
const resetConnection = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
let connection = await req.currentUser
|
let connection = await context.currentUser
|
||||||
.$relatedQuery('connections')
|
.$relatedQuery('connections')
|
||||||
.findOne({
|
.findOne({
|
||||||
id: params.id,
|
id: params.id,
|
||||||
@@ -24,13 +23,4 @@ const resetConnectionResolver = async (
|
|||||||
return connection;
|
return connection;
|
||||||
};
|
};
|
||||||
|
|
||||||
const resetConnection = {
|
|
||||||
type: connectionType,
|
|
||||||
args: {
|
|
||||||
id: { type: GraphQLNonNull(GraphQLString) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
resetConnectionResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default resetConnection;
|
export default resetConnection;
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
import { GraphQLString, GraphQLNonNull } from 'graphql';
|
import Context from '../../types/express/context';
|
||||||
import { GraphQLJSONObject } from 'graphql-type-json';
|
|
||||||
import connectionType from '../types/connection';
|
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
import { IJSONObject } from '@automatisch/types';
|
import { IJSONObject } from '@automatisch/types';
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
@@ -9,11 +6,12 @@ type Params = {
|
|||||||
formattedData: IJSONObject;
|
formattedData: IJSONObject;
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateConnectionResolver = async (
|
const updateConnection = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
let connection = await req.currentUser
|
let connection = await context.currentUser
|
||||||
.$relatedQuery('connections')
|
.$relatedQuery('connections')
|
||||||
.findOne({
|
.findOne({
|
||||||
id: params.id,
|
id: params.id,
|
||||||
@@ -30,14 +28,4 @@ const updateConnectionResolver = async (
|
|||||||
return connection;
|
return connection;
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateConnection = {
|
|
||||||
type: connectionType,
|
|
||||||
args: {
|
|
||||||
id: { type: GraphQLNonNull(GraphQLString) },
|
|
||||||
formattedData: { type: GraphQLNonNull(GraphQLJSONObject) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
updateConnectionResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default updateConnection;
|
export default updateConnection;
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
import { GraphQLString, GraphQLNonNull, GraphQLBoolean } from 'graphql';
|
import Context from '../../types/express/context';
|
||||||
import flowType from '../types/flow';
|
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -8,11 +6,12 @@ type Params = {
|
|||||||
active: boolean;
|
active: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateFlowResolver = async (
|
const updateFlow = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
let flow = await req.currentUser
|
let flow = await context.currentUser
|
||||||
.$relatedQuery('flows')
|
.$relatedQuery('flows')
|
||||||
.findOne({
|
.findOne({
|
||||||
id: params.id,
|
id: params.id,
|
||||||
@@ -24,15 +23,4 @@ const updateFlowResolver = async (
|
|||||||
return flow;
|
return flow;
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateFlow = {
|
|
||||||
type: flowType,
|
|
||||||
args: {
|
|
||||||
id: { type: GraphQLNonNull(GraphQLString) },
|
|
||||||
name: { type: GraphQLNonNull(GraphQLString) },
|
|
||||||
active: { type: GraphQLBoolean },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
updateFlowResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default updateFlow;
|
export default updateFlow;
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
import { GraphQLNonNull } from 'graphql';
|
|
||||||
import Step from '../../models/step';
|
import Step from '../../models/step';
|
||||||
import stepType, { stepInputType } from '../types/step';
|
import Context from '../../types/express/context';
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
input: {
|
input: {
|
||||||
@@ -17,13 +15,15 @@ type Params = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
const updateStepResolver = async (
|
|
||||||
|
const updateStep = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
const { input } = params;
|
const { input } = params;
|
||||||
|
|
||||||
let step = await req.currentUser
|
let step = await context.currentUser
|
||||||
.$relatedQuery('steps')
|
.$relatedQuery('steps')
|
||||||
.findOne({
|
.findOne({
|
||||||
'steps.id': input.id,
|
'steps.id': input.id,
|
||||||
@@ -43,13 +43,4 @@ const updateStepResolver = async (
|
|||||||
return step;
|
return step;
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateStep = {
|
|
||||||
type: stepType,
|
|
||||||
args: {
|
|
||||||
input: { type: new GraphQLNonNull(stepInputType) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
updateStepResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default updateStep;
|
export default updateStep;
|
||||||
|
@@ -1,17 +1,16 @@
|
|||||||
import { GraphQLString, GraphQLNonNull } from 'graphql';
|
import Context from '../../types/express/context';
|
||||||
import connectionType from '../types/connection';
|
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
import App from '../../models/app';
|
import App from '../../models/app';
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
id: string;
|
id: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const verifyConnectionResolver = async (
|
const verifyConnection = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
let connection = await req.currentUser
|
let connection = await context.currentUser
|
||||||
.$relatedQuery('connections')
|
.$relatedQuery('connections')
|
||||||
.findOne({
|
.findOne({
|
||||||
id: params.id,
|
id: params.id,
|
||||||
@@ -36,13 +35,4 @@ const verifyConnectionResolver = async (
|
|||||||
return connection;
|
return connection;
|
||||||
};
|
};
|
||||||
|
|
||||||
const verifyConnection = {
|
|
||||||
type: connectionType,
|
|
||||||
args: {
|
|
||||||
id: { type: GraphQLNonNull(GraphQLString) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
verifyConnectionResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default verifyConnection;
|
export default verifyConnection;
|
||||||
|
@@ -1,20 +1,20 @@
|
|||||||
import { GraphQLList, GraphQLNonNull } from 'graphql';
|
|
||||||
import App from '../../models/app';
|
import App from '../../models/app';
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
import Context from '../../types/express/context';
|
||||||
import connectionType from '../types/connection';
|
|
||||||
import availableAppsEnumType from '../types/available-apps-enum-type';
|
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
key: string;
|
key: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getAppConnectionsResolver = async (
|
const getAppConnections = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
const app = App.findOneByKey(params.key);
|
const app = App.findOneByKey(params.key);
|
||||||
|
|
||||||
const connections = await req.currentUser.$relatedQuery('connections').where({
|
const connections = await context.currentUser
|
||||||
|
.$relatedQuery('connections')
|
||||||
|
.where({
|
||||||
key: params.key,
|
key: params.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -24,13 +24,4 @@ const getAppConnectionsResolver = async (
|
|||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
const getAppConnections = {
|
|
||||||
type: GraphQLList(connectionType),
|
|
||||||
args: {
|
|
||||||
key: { type: GraphQLNonNull(availableAppsEnumType) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
getAppConnectionsResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default getAppConnections;
|
export default getAppConnections;
|
||||||
|
@@ -1,18 +1,15 @@
|
|||||||
import { GraphQLNonNull } from 'graphql';
|
|
||||||
import App from '../../models/app';
|
import App from '../../models/app';
|
||||||
import appType from '../types/app';
|
import Context from '../../types/express/context';
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
import availableAppsEnumType from '../types/available-apps-enum-type';
|
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
key: string;
|
key: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getAppResolver = async (params: Params, req: RequestWithCurrentUser) => {
|
const getApp = async (_parent: unknown, params: Params, context: Context) => {
|
||||||
const app = App.findOneByKey(params.key);
|
const app = App.findOneByKey(params.key);
|
||||||
|
|
||||||
if (req.currentUser) {
|
if (context.currentUser) {
|
||||||
const connections = await req.currentUser
|
const connections = await context.currentUser
|
||||||
.$relatedQuery('connections')
|
.$relatedQuery('connections')
|
||||||
.where({
|
.where({
|
||||||
key: params.key,
|
key: params.key,
|
||||||
@@ -27,13 +24,4 @@ const getAppResolver = async (params: Params, req: RequestWithCurrentUser) => {
|
|||||||
return app;
|
return app;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getApp = {
|
|
||||||
type: appType,
|
|
||||||
args: {
|
|
||||||
key: { type: GraphQLNonNull(availableAppsEnumType) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
getAppResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default getApp;
|
export default getApp;
|
||||||
|
@@ -1,29 +1,19 @@
|
|||||||
import { GraphQLString, GraphQLList, GraphQLBoolean } from 'graphql';
|
|
||||||
import appType from '../types/app';
|
|
||||||
import App from '../../models/app';
|
import App from '../../models/app';
|
||||||
|
import { IApp } from '@automatisch/types';
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
name: string;
|
name: string;
|
||||||
onlyWithTriggers: boolean;
|
onlyWithTriggers: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getAppsResolver = (params: Params) => {
|
const getApps = (_parent: unknown, params: Params) => {
|
||||||
const apps = App.findAll(params.name);
|
const apps = App.findAll(params.name);
|
||||||
|
|
||||||
if (params.onlyWithTriggers) {
|
if (params.onlyWithTriggers) {
|
||||||
return apps.filter((app: any) => app.triggers?.length);
|
return apps.filter((app: IApp) => app.triggers?.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
return apps;
|
return apps;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getApps = {
|
|
||||||
type: GraphQLList(appType),
|
|
||||||
args: {
|
|
||||||
name: { type: GraphQLString },
|
|
||||||
onlyWithTriggers: { type: GraphQLBoolean },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params) => getAppsResolver(params),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default getApps;
|
export default getApps;
|
||||||
|
@@ -1,19 +1,19 @@
|
|||||||
import { GraphQLList, GraphQLString } from 'graphql';
|
|
||||||
import App from '../../models/app';
|
import App from '../../models/app';
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
import Context from '../../types/express/context';
|
||||||
import appType from '../types/app';
|
import { IApp, IConnection } from '@automatisch/types';
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
name: string;
|
name: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getConnectedAppsResolver = async (
|
const getConnectedApps = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
let apps = App.findAll(params.name);
|
let apps = App.findAll(params.name);
|
||||||
|
|
||||||
const connections = await req.currentUser
|
const connections = await context.currentUser
|
||||||
.$relatedQuery('connections')
|
.$relatedQuery('connections')
|
||||||
.select('connections.key')
|
.select('connections.key')
|
||||||
.count('connections.id as count')
|
.count('connections.id as count')
|
||||||
@@ -23,10 +23,10 @@ const getConnectedAppsResolver = async (
|
|||||||
const connectionKeys = connections.map((connection) => connection.key);
|
const connectionKeys = connections.map((connection) => connection.key);
|
||||||
|
|
||||||
apps = apps
|
apps = apps
|
||||||
.filter((app: any) => connectionKeys.includes(app.key))
|
.filter((app: IApp) => connectionKeys.includes(app.key))
|
||||||
.map((app: any) => {
|
.map((app: IApp) => {
|
||||||
const connection = connections.find(
|
const connection = connections.find(
|
||||||
(connection: any) => connection.key === app.key
|
(connection: IConnection) => connection.key === app.key
|
||||||
);
|
);
|
||||||
|
|
||||||
app.connectionCount = connection.count;
|
app.connectionCount = connection.count;
|
||||||
@@ -36,13 +36,4 @@ const getConnectedAppsResolver = async (
|
|||||||
return apps;
|
return apps;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getConnectedApps = {
|
|
||||||
type: GraphQLList(appType),
|
|
||||||
args: {
|
|
||||||
name: { type: GraphQLString },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
getConnectedAppsResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default getConnectedApps;
|
export default getConnectedApps;
|
||||||
|
@@ -1,13 +1,11 @@
|
|||||||
import { GraphQLNonNull, GraphQLString } from 'graphql';
|
import Context from '../../types/express/context';
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
import flowType from '../types/flow';
|
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
id: string;
|
id: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getFlowResolver = async (params: Params, req: RequestWithCurrentUser) => {
|
const getFlow = async (_parent: unknown, params: Params, context: Context) => {
|
||||||
const flow = await req.currentUser
|
const flow = await context.currentUser
|
||||||
.$relatedQuery('flows')
|
.$relatedQuery('flows')
|
||||||
.withGraphJoined('[steps.[connection]]')
|
.withGraphJoined('[steps.[connection]]')
|
||||||
.orderBy('steps.position', 'asc')
|
.orderBy('steps.position', 'asc')
|
||||||
@@ -17,13 +15,4 @@ const getFlowResolver = async (params: Params, req: RequestWithCurrentUser) => {
|
|||||||
return flow;
|
return flow;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getFlow = {
|
|
||||||
type: flowType,
|
|
||||||
args: {
|
|
||||||
id: { type: GraphQLNonNull(GraphQLString) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
getFlowResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default getFlow;
|
export default getFlow;
|
||||||
|
@@ -1,21 +1,15 @@
|
|||||||
import { GraphQLList } from 'graphql';
|
import Context from '../../types/express/context';
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
import flowType from '../types/flow';
|
|
||||||
|
|
||||||
const getFlowsResolver = async (
|
const getFlows = async (
|
||||||
req: RequestWithCurrentUser
|
_parent: unknown,
|
||||||
): Promise<any[]> => {
|
_params: unknown,
|
||||||
const flows = await req.currentUser
|
context: Context
|
||||||
|
) => {
|
||||||
|
const flows = await context.currentUser
|
||||||
.$relatedQuery('flows')
|
.$relatedQuery('flows')
|
||||||
.withGraphJoined('[steps.[connection]]');
|
.withGraphJoined('[steps.[connection]]');
|
||||||
|
|
||||||
return flows;
|
return flows;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getFlows = {
|
|
||||||
type: GraphQLList(flowType),
|
|
||||||
resolve: (_: any, _params: any, req: RequestWithCurrentUser) =>
|
|
||||||
getFlowsResolver(req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default getFlows;
|
export default getFlows;
|
||||||
|
@@ -1,21 +1,20 @@
|
|||||||
import { GraphQLNonNull, GraphQLString, GraphQLList } from 'graphql';
|
import Context from '../../types/express/context';
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
import stepType from '../types/step';
|
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
stepId: string;
|
stepId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getStepWithTestExecutionsResolver = async (
|
const getStepWithTestExecutions = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
const step = await req.currentUser
|
const step = await context.currentUser
|
||||||
.$relatedQuery('steps')
|
.$relatedQuery('steps')
|
||||||
.findOne({ 'steps.id': params.stepId })
|
.findOne({ 'steps.id': params.stepId })
|
||||||
.throwIfNotFound();
|
.throwIfNotFound();
|
||||||
|
|
||||||
const previousStepsWithCurrentStep = await req.currentUser
|
const previousStepsWithCurrentStep = await context.currentUser
|
||||||
.$relatedQuery('steps')
|
.$relatedQuery('steps')
|
||||||
.withGraphJoined('executionSteps')
|
.withGraphJoined('executionSteps')
|
||||||
.where('flow_id', '=', step.flowId)
|
.where('flow_id', '=', step.flowId)
|
||||||
@@ -29,13 +28,4 @@ const getStepWithTestExecutionsResolver = async (
|
|||||||
return previousStepsWithCurrentStep;
|
return previousStepsWithCurrentStep;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getStepWithTestExecutions = {
|
|
||||||
type: GraphQLList(stepType),
|
|
||||||
args: {
|
|
||||||
stepId: { type: GraphQLNonNull(GraphQLString) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
getStepWithTestExecutionsResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default getStepWithTestExecutions;
|
export default getStepWithTestExecutions;
|
||||||
|
@@ -1,17 +1,17 @@
|
|||||||
import { GraphQLString, GraphQLNonNull } from 'graphql';
|
import Context from '../../types/express/context';
|
||||||
import RequestWithCurrentUser from '../../types/express/request-with-current-user';
|
|
||||||
import connectionType from '../types/connection';
|
|
||||||
import App from '../../models/app';
|
import App from '../../models/app';
|
||||||
|
|
||||||
type Params = {
|
type Params = {
|
||||||
id: string;
|
id: string;
|
||||||
data: object;
|
data: object;
|
||||||
};
|
};
|
||||||
const testConnectionResolver = async (
|
|
||||||
|
const testConnection = async (
|
||||||
|
_parent: unknown,
|
||||||
params: Params,
|
params: Params,
|
||||||
req: RequestWithCurrentUser
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
let connection = await req.currentUser
|
let connection = await context.currentUser
|
||||||
.$relatedQuery('connections')
|
.$relatedQuery('connections')
|
||||||
.findOne({
|
.findOne({
|
||||||
id: params.id,
|
id: params.id,
|
||||||
@@ -33,13 +33,4 @@ const testConnectionResolver = async (
|
|||||||
return connection;
|
return connection;
|
||||||
};
|
};
|
||||||
|
|
||||||
const testConnection = {
|
|
||||||
type: connectionType,
|
|
||||||
args: {
|
|
||||||
id: { type: GraphQLNonNull(GraphQLString) },
|
|
||||||
},
|
|
||||||
resolve: (_: any, params: Params, req: RequestWithCurrentUser) =>
|
|
||||||
testConnectionResolver(params, req),
|
|
||||||
};
|
|
||||||
|
|
||||||
export default testConnection;
|
export default testConnection;
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
import { GraphQLObjectType } from 'graphql';
|
|
||||||
import getApps from './queries/get-apps';
|
import getApps from './queries/get-apps';
|
||||||
import getApp from './queries/get-app';
|
import getApp from './queries/get-app';
|
||||||
import getConnectedApps from './queries/get-connected-apps';
|
import getConnectedApps from './queries/get-connected-apps';
|
||||||
@@ -8,9 +7,7 @@ import getFlow from './queries/get-flow';
|
|||||||
import getFlows from './queries/get-flows';
|
import getFlows from './queries/get-flows';
|
||||||
import getStepWithTestExecutions from './queries/get-step-with-test-executions';
|
import getStepWithTestExecutions from './queries/get-step-with-test-executions';
|
||||||
|
|
||||||
const rootQuery = new GraphQLObjectType({
|
const queryResolvers = {
|
||||||
name: 'Query',
|
|
||||||
fields: {
|
|
||||||
getApps,
|
getApps,
|
||||||
getApp,
|
getApp,
|
||||||
getConnectedApps,
|
getConnectedApps,
|
||||||
@@ -19,7 +16,6 @@ const rootQuery = new GraphQLObjectType({
|
|||||||
getFlow,
|
getFlow,
|
||||||
getFlows,
|
getFlows,
|
||||||
getStepWithTestExecutions,
|
getStepWithTestExecutions,
|
||||||
},
|
};
|
||||||
});
|
|
||||||
|
|
||||||
export default rootQuery;
|
export default queryResolvers;
|
9
packages/backend/src/graphql/resolvers.ts
Normal file
9
packages/backend/src/graphql/resolvers.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import mutationResolvers from './mutation-resolvers';
|
||||||
|
import queryResolvers from './query-resolvers';
|
||||||
|
|
||||||
|
const resolvers = {
|
||||||
|
Query: queryResolvers,
|
||||||
|
Mutation: mutationResolvers,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default resolvers;
|
272
packages/backend/src/graphql/schema.graphql
Normal file
272
packages/backend/src/graphql/schema.graphql
Normal file
@@ -0,0 +1,272 @@
|
|||||||
|
type Query {
|
||||||
|
getApps(name: String, onlyWithTriggers: Boolean): [App]
|
||||||
|
getApp(key: AvailableAppsEnumType!): App
|
||||||
|
getConnectedApps(name: String): [App]
|
||||||
|
getAppConnections(key: AvailableAppsEnumType!): [Connection]
|
||||||
|
testConnection(id: String!): Connection
|
||||||
|
getFlow(id: String!): Flow
|
||||||
|
getFlows: [Flow]
|
||||||
|
getStepWithTestExecutions(stepId: String!): [Step]
|
||||||
|
}
|
||||||
|
|
||||||
|
type Mutation {
|
||||||
|
createConnection(
|
||||||
|
key: AvailableAppsEnumType!
|
||||||
|
formattedData: JSONObject!
|
||||||
|
): Connection
|
||||||
|
createAuthData(id: String!): AuthLink
|
||||||
|
updateConnection(id: String!, formattedData: JSONObject!): Connection
|
||||||
|
resetConnection(id: String!): Connection
|
||||||
|
verifyConnection(id: String!): Connection
|
||||||
|
deleteConnection(id: String!): Boolean
|
||||||
|
createFlow(input: FlowInput): Flow
|
||||||
|
updateFlow(id: String!, name: String!, active: Boolean): Flow
|
||||||
|
deleteFlow(id: String!): Boolean
|
||||||
|
createStep(input: StepInput!): Step
|
||||||
|
updateStep(input: StepInput!): Step
|
||||||
|
deleteStep(id: String!): Step
|
||||||
|
executeFlow(stepId: String!): executeFlowType
|
||||||
|
login(email: String!, password: String!): Auth
|
||||||
|
}
|
||||||
|
|
||||||
|
"""
|
||||||
|
Exposes a URL that specifies the behaviour of this scalar.
|
||||||
|
"""
|
||||||
|
directive @specifiedBy(
|
||||||
|
"""
|
||||||
|
The URL that specifies the behaviour of this scalar.
|
||||||
|
"""
|
||||||
|
url: String!
|
||||||
|
) on SCALAR
|
||||||
|
|
||||||
|
type Action {
|
||||||
|
name: String
|
||||||
|
key: String
|
||||||
|
description: String
|
||||||
|
subSteps: [ActionSubStep]
|
||||||
|
}
|
||||||
|
|
||||||
|
type ActionSubStep {
|
||||||
|
key: String
|
||||||
|
name: String
|
||||||
|
arguments: [ActionSubStepArgument]
|
||||||
|
}
|
||||||
|
|
||||||
|
type ActionSubStepArgument {
|
||||||
|
label: String
|
||||||
|
key: String
|
||||||
|
type: String
|
||||||
|
description: String
|
||||||
|
required: Boolean
|
||||||
|
variables: Boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
type App {
|
||||||
|
name: String
|
||||||
|
key: String
|
||||||
|
connectionCount: Int
|
||||||
|
iconUrl: String
|
||||||
|
docUrl: String
|
||||||
|
primaryColor: String
|
||||||
|
fields: [Field]
|
||||||
|
authenticationSteps: [AuthenticationStep]
|
||||||
|
reconnectionSteps: [ReconnectionStep]
|
||||||
|
triggers: [Trigger]
|
||||||
|
actions: [Action]
|
||||||
|
connections: [Connection]
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ArgumentEnumType {
|
||||||
|
integer
|
||||||
|
string
|
||||||
|
}
|
||||||
|
|
||||||
|
type Auth {
|
||||||
|
user: User
|
||||||
|
token: String
|
||||||
|
}
|
||||||
|
|
||||||
|
type AuthenticationStep {
|
||||||
|
step: Int
|
||||||
|
type: String
|
||||||
|
name: String
|
||||||
|
arguments: [AuthenticationStepArgument]
|
||||||
|
}
|
||||||
|
|
||||||
|
type AuthenticationStepArgument {
|
||||||
|
name: String
|
||||||
|
value: String
|
||||||
|
type: ArgumentEnumType
|
||||||
|
properties: [AuthenticationStepProperty]
|
||||||
|
}
|
||||||
|
|
||||||
|
type AuthenticationStepProperty {
|
||||||
|
name: String
|
||||||
|
value: String
|
||||||
|
}
|
||||||
|
|
||||||
|
type AuthLink {
|
||||||
|
url: String
|
||||||
|
}
|
||||||
|
|
||||||
|
enum AvailableAppsEnumType {
|
||||||
|
discord
|
||||||
|
firebase
|
||||||
|
flickr
|
||||||
|
github
|
||||||
|
postgresql
|
||||||
|
smtp
|
||||||
|
twilio
|
||||||
|
twitch
|
||||||
|
twitter
|
||||||
|
typeform
|
||||||
|
}
|
||||||
|
|
||||||
|
type Connection {
|
||||||
|
id: String
|
||||||
|
key: String
|
||||||
|
formattedData: ConnectionData
|
||||||
|
verified: Boolean
|
||||||
|
app: App
|
||||||
|
createdAt: String
|
||||||
|
}
|
||||||
|
|
||||||
|
type ConnectionData {
|
||||||
|
screenName: String
|
||||||
|
}
|
||||||
|
|
||||||
|
type executeFlowType {
|
||||||
|
data: JSONObject
|
||||||
|
step: Step
|
||||||
|
}
|
||||||
|
|
||||||
|
type ExecutionStep {
|
||||||
|
id: String
|
||||||
|
executionId: String
|
||||||
|
stepId: String
|
||||||
|
status: String
|
||||||
|
dataIn: JSONObject
|
||||||
|
dataOut: JSONObject
|
||||||
|
}
|
||||||
|
|
||||||
|
type Field {
|
||||||
|
key: String
|
||||||
|
label: String
|
||||||
|
type: String
|
||||||
|
required: Boolean
|
||||||
|
readOnly: Boolean
|
||||||
|
value: String
|
||||||
|
placeholder: String
|
||||||
|
description: String
|
||||||
|
docUrl: String
|
||||||
|
clickToCopy: Boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
type Flow {
|
||||||
|
id: String
|
||||||
|
name: String
|
||||||
|
active: Boolean
|
||||||
|
steps: [Step]
|
||||||
|
}
|
||||||
|
|
||||||
|
input FlowInput {
|
||||||
|
triggerAppKey: String
|
||||||
|
}
|
||||||
|
|
||||||
|
"""
|
||||||
|
The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
|
||||||
|
"""
|
||||||
|
scalar JSONObject
|
||||||
|
|
||||||
|
input PreviousStepInput {
|
||||||
|
id: String
|
||||||
|
}
|
||||||
|
|
||||||
|
type ReconnectionStep {
|
||||||
|
step: Int
|
||||||
|
type: String
|
||||||
|
name: String
|
||||||
|
arguments: [ReconnectionStepArgument]
|
||||||
|
}
|
||||||
|
|
||||||
|
type ReconnectionStepArgument {
|
||||||
|
name: String
|
||||||
|
value: String
|
||||||
|
type: ArgumentEnumType
|
||||||
|
properties: [ReconnectionStepProperty]
|
||||||
|
}
|
||||||
|
|
||||||
|
type ReconnectionStepProperty {
|
||||||
|
name: String
|
||||||
|
value: String
|
||||||
|
}
|
||||||
|
|
||||||
|
type Step {
|
||||||
|
id: String
|
||||||
|
previousStepId: String
|
||||||
|
key: String
|
||||||
|
appKey: String
|
||||||
|
type: StepEnumType
|
||||||
|
parameters: JSONObject
|
||||||
|
connection: Connection
|
||||||
|
flow: Flow
|
||||||
|
position: Int
|
||||||
|
status: String
|
||||||
|
executionSteps: [ExecutionStep]
|
||||||
|
}
|
||||||
|
|
||||||
|
input StepConnectionInput {
|
||||||
|
id: String
|
||||||
|
}
|
||||||
|
|
||||||
|
enum StepEnumType {
|
||||||
|
trigger
|
||||||
|
action
|
||||||
|
}
|
||||||
|
|
||||||
|
input StepFlowInput {
|
||||||
|
id: String
|
||||||
|
}
|
||||||
|
|
||||||
|
input StepInput {
|
||||||
|
id: String
|
||||||
|
previousStepId: String
|
||||||
|
key: String
|
||||||
|
appKey: String
|
||||||
|
connection: StepConnectionInput
|
||||||
|
flow: StepFlowInput
|
||||||
|
parameters: JSONObject
|
||||||
|
previousStep: PreviousStepInput
|
||||||
|
}
|
||||||
|
|
||||||
|
type Trigger {
|
||||||
|
name: String
|
||||||
|
key: String
|
||||||
|
description: String
|
||||||
|
subSteps: [TriggerSubStep]
|
||||||
|
}
|
||||||
|
|
||||||
|
type TriggerSubStep {
|
||||||
|
key: String
|
||||||
|
name: String
|
||||||
|
arguments: [TriggerSubStepArgument]
|
||||||
|
}
|
||||||
|
|
||||||
|
type TriggerSubStepArgument {
|
||||||
|
label: String
|
||||||
|
key: String
|
||||||
|
type: String
|
||||||
|
required: Boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
type User {
|
||||||
|
id: String
|
||||||
|
email: String
|
||||||
|
createdAt: String
|
||||||
|
updatedAt: String
|
||||||
|
}
|
||||||
|
|
||||||
|
schema {
|
||||||
|
query: Query
|
||||||
|
mutation: Mutation
|
||||||
|
}
|
@@ -1,38 +0,0 @@
|
|||||||
import { GraphQLObjectType, GraphQLString, GraphQLList, GraphQLBoolean } from 'graphql';
|
|
||||||
|
|
||||||
const actionType = new GraphQLObjectType({
|
|
||||||
name: 'Action',
|
|
||||||
fields: {
|
|
||||||
name: { type: GraphQLString },
|
|
||||||
key: { type: GraphQLString },
|
|
||||||
description: { type: GraphQLString },
|
|
||||||
subSteps: {
|
|
||||||
type: GraphQLList(
|
|
||||||
new GraphQLObjectType({
|
|
||||||
name: 'ActionSubStep',
|
|
||||||
fields: {
|
|
||||||
key: { type: GraphQLString },
|
|
||||||
name: { type: GraphQLString },
|
|
||||||
arguments: {
|
|
||||||
type: GraphQLList(
|
|
||||||
new GraphQLObjectType({
|
|
||||||
name: 'ActionSubStepArgument',
|
|
||||||
fields: {
|
|
||||||
label: { type: GraphQLString },
|
|
||||||
key: { type: GraphQLString },
|
|
||||||
type: { type: GraphQLString },
|
|
||||||
description: { type: GraphQLString },
|
|
||||||
required: { type: GraphQLBoolean },
|
|
||||||
variables: { type: GraphQLBoolean }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
export default actionType;
|
|
@@ -1,31 +0,0 @@
|
|||||||
import { GraphQLObjectType, GraphQLString, GraphQLList, GraphQLInt } from 'graphql';
|
|
||||||
import fieldType from './field';
|
|
||||||
import authenticationStepType from './authentication-step';
|
|
||||||
import reconnectionStepType from './reconnection-step';
|
|
||||||
import triggerType from './trigger';
|
|
||||||
import actionType from './action';
|
|
||||||
|
|
||||||
const appType = new GraphQLObjectType({
|
|
||||||
name: 'App',
|
|
||||||
fields: () => {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
||||||
const connectionType = require('./connection').default;
|
|
||||||
|
|
||||||
return {
|
|
||||||
name: { type: GraphQLString },
|
|
||||||
key: { type: GraphQLString },
|
|
||||||
connectionCount: { type: GraphQLInt },
|
|
||||||
iconUrl: { type: GraphQLString },
|
|
||||||
docUrl: { type: GraphQLString },
|
|
||||||
primaryColor: { type: GraphQLString },
|
|
||||||
fields: { type: GraphQLList(fieldType) },
|
|
||||||
authenticationSteps: { type: GraphQLList(authenticationStepType) },
|
|
||||||
reconnectionSteps: { type: GraphQLList(reconnectionStepType) },
|
|
||||||
triggers: { type: GraphQLList(triggerType) },
|
|
||||||
actions: { type: GraphQLList(actionType) },
|
|
||||||
connections: { type: GraphQLList(connectionType) },
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
export default appType;
|
|
@@ -1,13 +0,0 @@
|
|||||||
import { GraphQLEnumType } from 'graphql';
|
|
||||||
|
|
||||||
const argumentEnumValues = {
|
|
||||||
integer: { value: 'integer' },
|
|
||||||
string: { value: 'string' }
|
|
||||||
}
|
|
||||||
|
|
||||||
const ArgumentEnumType = new GraphQLEnumType({
|
|
||||||
name: 'ArgumentEnumType',
|
|
||||||
values: argumentEnumValues
|
|
||||||
})
|
|
||||||
|
|
||||||
export default ArgumentEnumType;
|
|
@@ -1,10 +0,0 @@
|
|||||||
import { GraphQLObjectType, GraphQLString } from 'graphql';
|
|
||||||
|
|
||||||
const authLinkType = new GraphQLObjectType({
|
|
||||||
name: 'AuthLink',
|
|
||||||
fields: {
|
|
||||||
url: { type: GraphQLString }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
export default authLinkType;
|
|
@@ -1,12 +0,0 @@
|
|||||||
import { GraphQLObjectType, GraphQLString } from 'graphql';
|
|
||||||
import UserType from './user';
|
|
||||||
|
|
||||||
const authType = new GraphQLObjectType({
|
|
||||||
name: 'Auth',
|
|
||||||
fields: {
|
|
||||||
user: { type: UserType },
|
|
||||||
token: { type: GraphQLString },
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
export default authType;
|
|
@@ -1,36 +0,0 @@
|
|||||||
import { GraphQLObjectType, GraphQLString, GraphQLList, GraphQLInt } from 'graphql';
|
|
||||||
import ArgumentEnumType from './argument-enum-type';
|
|
||||||
|
|
||||||
const authenticationStepType = new GraphQLObjectType({
|
|
||||||
name: 'AuthenticationStep',
|
|
||||||
fields: {
|
|
||||||
step: { type: GraphQLInt },
|
|
||||||
type: { type: GraphQLString },
|
|
||||||
name: { type: GraphQLString },
|
|
||||||
arguments: {
|
|
||||||
type: GraphQLList(
|
|
||||||
new GraphQLObjectType({
|
|
||||||
name: 'AuthenticationStepArgument',
|
|
||||||
fields: {
|
|
||||||
name: { type: GraphQLString },
|
|
||||||
value: { type: GraphQLString },
|
|
||||||
type: { type: ArgumentEnumType },
|
|
||||||
properties: {
|
|
||||||
type: GraphQLList(
|
|
||||||
new GraphQLObjectType({
|
|
||||||
name: 'AuthenticationStepProperty',
|
|
||||||
fields: {
|
|
||||||
name: { type: GraphQLString },
|
|
||||||
value: { type: GraphQLString }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
export default authenticationStepType;
|
|
@@ -1,17 +0,0 @@
|
|||||||
import type { IApp } from '@automatisch/types';
|
|
||||||
import { GraphQLEnumType } from 'graphql';
|
|
||||||
import App from '../../models/app';
|
|
||||||
|
|
||||||
const apps = App.findAll();
|
|
||||||
const availableAppEnumValues: any = {}
|
|
||||||
|
|
||||||
apps.forEach((app: IApp) => {
|
|
||||||
availableAppEnumValues[app.key] = { value: app.key }
|
|
||||||
})
|
|
||||||
|
|
||||||
const availableAppsEnumType = new GraphQLEnumType({
|
|
||||||
name: 'AvailableAppsEnumType',
|
|
||||||
values: availableAppEnumValues
|
|
||||||
})
|
|
||||||
|
|
||||||
export default availableAppsEnumType;
|
|
@@ -1,10 +0,0 @@
|
|||||||
import { GraphQLString, GraphQLObjectType } from 'graphql';
|
|
||||||
|
|
||||||
const connectionDataType = new GraphQLObjectType({
|
|
||||||
name: 'ConnectionData',
|
|
||||||
fields: {
|
|
||||||
screenName: { type: GraphQLString },
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
export default connectionDataType;
|
|
@@ -1,21 +0,0 @@
|
|||||||
import { GraphQLObjectType, GraphQLString, GraphQLBoolean } from 'graphql';
|
|
||||||
import connectionDataType from './connection-data';
|
|
||||||
|
|
||||||
const connectionType = new GraphQLObjectType({
|
|
||||||
name: 'Connection',
|
|
||||||
fields: () => {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
||||||
const appType = require('./app').default;
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: { type: GraphQLString },
|
|
||||||
key: { type: GraphQLString },
|
|
||||||
formattedData: { type: connectionDataType },
|
|
||||||
verified: { type: GraphQLBoolean },
|
|
||||||
app: { type: appType },
|
|
||||||
createdAt: { type: GraphQLString },
|
|
||||||
};
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
export default connectionType;
|
|
@@ -1,13 +0,0 @@
|
|||||||
import { GraphQLJSONObject } from 'graphql-type-json';
|
|
||||||
import { GraphQLObjectType } from 'graphql';
|
|
||||||
import stepType from './step';
|
|
||||||
|
|
||||||
const executeFlowType = new GraphQLObjectType({
|
|
||||||
name: 'executeFlowType',
|
|
||||||
fields: {
|
|
||||||
data: { type: GraphQLJSONObject },
|
|
||||||
step: { type: stepType },
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
export default executeFlowType;
|
|
@@ -1,16 +0,0 @@
|
|||||||
import { GraphQLObjectType, GraphQLString, GraphQLBoolean } from 'graphql';
|
|
||||||
import { GraphQLJSONObject } from 'graphql-type-json';
|
|
||||||
|
|
||||||
const executionStepType = new GraphQLObjectType({
|
|
||||||
name: 'ExecutionStep',
|
|
||||||
fields: {
|
|
||||||
id: { type: GraphQLString },
|
|
||||||
executionId: { type: GraphQLString },
|
|
||||||
stepId: { type: GraphQLString },
|
|
||||||
status: { type: GraphQLString },
|
|
||||||
dataIn: { type: GraphQLJSONObject },
|
|
||||||
dataOut: { type: GraphQLJSONObject },
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
export default executionStepType;
|
|
@@ -1,19 +0,0 @@
|
|||||||
import { GraphQLObjectType, GraphQLString, GraphQLBoolean} from 'graphql';
|
|
||||||
|
|
||||||
const fieldType = new GraphQLObjectType({
|
|
||||||
name: 'Field',
|
|
||||||
fields: {
|
|
||||||
key: { type: GraphQLString },
|
|
||||||
label: { type: GraphQLString },
|
|
||||||
type: { type: GraphQLString },
|
|
||||||
required: { type: GraphQLBoolean},
|
|
||||||
readOnly: { type: GraphQLBoolean},
|
|
||||||
value: { type: GraphQLString},
|
|
||||||
placeholder: { type: GraphQLString},
|
|
||||||
description: { type: GraphQLString},
|
|
||||||
docUrl: { type: GraphQLString},
|
|
||||||
clickToCopy: { type: GraphQLBoolean},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
export default fieldType;
|
|
@@ -1,33 +0,0 @@
|
|||||||
import {
|
|
||||||
GraphQLList,
|
|
||||||
GraphQLObjectType,
|
|
||||||
GraphQLInputObjectType,
|
|
||||||
GraphQLString,
|
|
||||||
GraphQLBoolean,
|
|
||||||
} from 'graphql';
|
|
||||||
|
|
||||||
const flowType = new GraphQLObjectType({
|
|
||||||
name: 'Flow',
|
|
||||||
fields: () => {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
||||||
const StepType = require('./step').default;
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: { type: GraphQLString },
|
|
||||||
name: { type: GraphQLString },
|
|
||||||
active: { type: GraphQLBoolean },
|
|
||||||
steps: {
|
|
||||||
type: GraphQLList(StepType),
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
export const flowInputType = new GraphQLInputObjectType({
|
|
||||||
name: 'FlowInput',
|
|
||||||
fields: {
|
|
||||||
triggerAppKey: { type: GraphQLString },
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
export default flowType;
|
|
@@ -1,36 +0,0 @@
|
|||||||
import { GraphQLObjectType, GraphQLString, GraphQLList, GraphQLInt } from 'graphql';
|
|
||||||
import ArgumentEnumType from './argument-enum-type';
|
|
||||||
|
|
||||||
const reconnectionStepType = new GraphQLObjectType({
|
|
||||||
name: 'ReconnectionStep',
|
|
||||||
fields: {
|
|
||||||
step: { type: GraphQLInt },
|
|
||||||
type: { type: GraphQLString },
|
|
||||||
name: { type: GraphQLString },
|
|
||||||
arguments: {
|
|
||||||
type: GraphQLList(
|
|
||||||
new GraphQLObjectType({
|
|
||||||
name: 'ReconnectionStepArgument',
|
|
||||||
fields: {
|
|
||||||
name: { type: GraphQLString },
|
|
||||||
value: { type: GraphQLString },
|
|
||||||
type: { type: ArgumentEnumType },
|
|
||||||
properties: {
|
|
||||||
type: GraphQLList(
|
|
||||||
new GraphQLObjectType({
|
|
||||||
name: 'ReconnectionStepProperty',
|
|
||||||
fields: {
|
|
||||||
name: { type: GraphQLString },
|
|
||||||
value: { type: GraphQLString }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
export default reconnectionStepType;
|
|
@@ -1,80 +0,0 @@
|
|||||||
import {
|
|
||||||
GraphQLObjectType,
|
|
||||||
GraphQLString,
|
|
||||||
GraphQLEnumType,
|
|
||||||
GraphQLInt,
|
|
||||||
GraphQLInputObjectType,
|
|
||||||
GraphQLList,
|
|
||||||
} from 'graphql';
|
|
||||||
import { GraphQLJSONObject } from 'graphql-type-json';
|
|
||||||
import ConnectionType from './connection';
|
|
||||||
import ExecutionStepType from './execution-step';
|
|
||||||
|
|
||||||
const stepType = new GraphQLObjectType({
|
|
||||||
name: 'Step',
|
|
||||||
fields: () => {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
||||||
const FlowType = require('./flow').default;
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: { type: GraphQLString },
|
|
||||||
previousStepId: { type: GraphQLString },
|
|
||||||
key: { type: GraphQLString },
|
|
||||||
appKey: { type: GraphQLString },
|
|
||||||
type: {
|
|
||||||
type: new GraphQLEnumType({
|
|
||||||
name: 'StepEnumType',
|
|
||||||
values: {
|
|
||||||
trigger: { value: 'trigger' },
|
|
||||||
action: { value: 'action' },
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
parameters: { type: GraphQLJSONObject },
|
|
||||||
connection: { type: ConnectionType },
|
|
||||||
flow: { type: FlowType },
|
|
||||||
position: { type: GraphQLInt },
|
|
||||||
status: { type: GraphQLString },
|
|
||||||
executionSteps: {
|
|
||||||
type: GraphQLList(ExecutionStepType),
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
export const stepInputType = new GraphQLInputObjectType({
|
|
||||||
name: 'StepInput',
|
|
||||||
fields: {
|
|
||||||
id: { type: GraphQLString },
|
|
||||||
previousStepId: { type: GraphQLString },
|
|
||||||
key: { type: GraphQLString },
|
|
||||||
appKey: { type: GraphQLString },
|
|
||||||
connection: {
|
|
||||||
type: new GraphQLInputObjectType({
|
|
||||||
name: 'StepConnectionInput',
|
|
||||||
fields: {
|
|
||||||
id: { type: GraphQLString },
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
flow: {
|
|
||||||
type: new GraphQLInputObjectType({
|
|
||||||
name: 'StepFlowInput',
|
|
||||||
fields: {
|
|
||||||
id: { type: GraphQLString },
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
parameters: { type: GraphQLJSONObject },
|
|
||||||
previousStep: {
|
|
||||||
type: new GraphQLInputObjectType({
|
|
||||||
name: 'PreviousStepInput',
|
|
||||||
fields: {
|
|
||||||
id: { type: GraphQLString },
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
export default stepType;
|
|
@@ -1,36 +0,0 @@
|
|||||||
import { GraphQLObjectType, GraphQLString, GraphQLList, GraphQLBoolean } from 'graphql';
|
|
||||||
|
|
||||||
const triggerType = new GraphQLObjectType({
|
|
||||||
name: 'Trigger',
|
|
||||||
fields: {
|
|
||||||
name: { type: GraphQLString },
|
|
||||||
key: { type: GraphQLString },
|
|
||||||
description: { type: GraphQLString },
|
|
||||||
subSteps: {
|
|
||||||
type: GraphQLList(
|
|
||||||
new GraphQLObjectType({
|
|
||||||
name: 'TriggerSubStep',
|
|
||||||
fields: {
|
|
||||||
key: { type: GraphQLString },
|
|
||||||
name: { type: GraphQLString },
|
|
||||||
arguments: {
|
|
||||||
type: GraphQLList(
|
|
||||||
new GraphQLObjectType({
|
|
||||||
name: 'TriggerSubStepArgument',
|
|
||||||
fields: {
|
|
||||||
label: { type: GraphQLString },
|
|
||||||
key: { type: GraphQLString },
|
|
||||||
type: { type: GraphQLString },
|
|
||||||
required: { type: GraphQLBoolean }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
export default triggerType;
|
|
@@ -1,13 +0,0 @@
|
|||||||
import { GraphQLObjectType, GraphQLString } from 'graphql';
|
|
||||||
|
|
||||||
const userType = new GraphQLObjectType({
|
|
||||||
name: 'User',
|
|
||||||
fields: {
|
|
||||||
id: { type: GraphQLString },
|
|
||||||
email: { type: GraphQLString },
|
|
||||||
createdAt: { type: GraphQLString },
|
|
||||||
updatedAt: { type: GraphQLString },
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
export default userType;
|
|
@@ -1,11 +1,24 @@
|
|||||||
import { graphqlHTTP } from 'express-graphql';
|
import { graphqlHTTP } from 'express-graphql';
|
||||||
import graphQLSchema from '../graphql/graphql-schema';
|
|
||||||
import logger from '../helpers/logger';
|
import logger from '../helpers/logger';
|
||||||
import { applyMiddleware } from 'graphql-middleware';
|
import { applyMiddleware } from 'graphql-middleware';
|
||||||
import authentication from '../helpers/authentication';
|
import authentication from '../helpers/authentication';
|
||||||
|
import { join } from 'path';
|
||||||
|
import { loadSchemaSync } from '@graphql-tools/load';
|
||||||
|
import { GraphQLFileLoader } from '@graphql-tools/graphql-file-loader';
|
||||||
|
import { addResolversToSchema } from '@graphql-tools/schema';
|
||||||
|
import resolvers from '../graphql/resolvers';
|
||||||
|
|
||||||
|
const schema = loadSchemaSync(join(__dirname, '../graphql/schema.graphql'), {
|
||||||
|
loaders: [new GraphQLFileLoader()],
|
||||||
|
});
|
||||||
|
|
||||||
|
const schemaWithResolvers = addResolversToSchema({
|
||||||
|
schema,
|
||||||
|
resolvers,
|
||||||
|
});
|
||||||
|
|
||||||
const graphQLInstance = graphqlHTTP({
|
const graphQLInstance = graphqlHTTP({
|
||||||
schema: applyMiddleware(graphQLSchema, authentication),
|
schema: applyMiddleware(schemaWithResolvers, authentication),
|
||||||
graphiql: true,
|
graphiql: true,
|
||||||
customFormatErrorFn: (error) => {
|
customFormatErrorFn: (error) => {
|
||||||
logger.error(error.path + ' : ' + error.message + '\n' + error.stack);
|
logger.error(error.path + ' : ' + error.message + '\n' + error.stack);
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import { Request } from 'express';
|
import { Request } from 'express';
|
||||||
import User from '../../models/user';
|
import User from '../../models/user';
|
||||||
|
|
||||||
interface RequestWithCurrentUser extends Request {
|
interface Context extends Request {
|
||||||
currentUser: User;
|
currentUser: User;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default RequestWithCurrentUser;
|
export default Context;
|
115
yarn.lock
115
yarn.lock
@@ -157,6 +157,24 @@
|
|||||||
tslib "^2.3.0"
|
tslib "^2.3.0"
|
||||||
zen-observable-ts "^1.2.0"
|
zen-observable-ts "^1.2.0"
|
||||||
|
|
||||||
|
"@apollo/client@~3.2.5 || ~3.3.0 || ~3.4.0":
|
||||||
|
version "3.4.17"
|
||||||
|
resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.4.17.tgz#4972e19a49809e16d17c5adc67f45623a6dac135"
|
||||||
|
integrity sha512-MDt2rwMX1GqodiVEKJqmDmAz8xr0qJmq5PdWeIt0yDaT4GOkKYWZiWkyfhfv3raTk8PyJvbsNG9q2CqmUrlGfg==
|
||||||
|
dependencies:
|
||||||
|
"@graphql-typed-document-node/core" "^3.0.0"
|
||||||
|
"@wry/context" "^0.6.0"
|
||||||
|
"@wry/equality" "^0.5.0"
|
||||||
|
"@wry/trie" "^0.3.0"
|
||||||
|
graphql-tag "^2.12.3"
|
||||||
|
hoist-non-react-statics "^3.3.2"
|
||||||
|
optimism "^0.16.1"
|
||||||
|
prop-types "^15.7.2"
|
||||||
|
symbol-observable "^4.0.0"
|
||||||
|
ts-invariant "^0.9.0"
|
||||||
|
tslib "^2.3.0"
|
||||||
|
zen-observable-ts "~1.1.0"
|
||||||
|
|
||||||
"@babel/code-frame@7.12.11":
|
"@babel/code-frame@7.12.11":
|
||||||
version "7.12.11"
|
version "7.12.11"
|
||||||
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f"
|
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f"
|
||||||
@@ -2117,6 +2135,36 @@
|
|||||||
tslib "~2.3.0"
|
tslib "~2.3.0"
|
||||||
value-or-promise "1.0.11"
|
value-or-promise "1.0.11"
|
||||||
|
|
||||||
|
"@graphql-tools/graphql-file-loader@^7.3.4":
|
||||||
|
version "7.3.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-file-loader/-/graphql-file-loader-7.3.4.tgz#61e3e7e6223a21fbdd987f2abaa6f14104ab7b4a"
|
||||||
|
integrity sha512-Q0/YtDq0APR6syRclsQMNguWKRlchd8nFTOpLhfc7Xeiy21VhEEi4Ik+quRySfb7ubDfJGhiUq4MQW43FhWJvg==
|
||||||
|
dependencies:
|
||||||
|
"@graphql-tools/import" "^6.6.6"
|
||||||
|
"@graphql-tools/utils" "^8.6.2"
|
||||||
|
globby "^11.0.3"
|
||||||
|
tslib "~2.3.0"
|
||||||
|
unixify "^1.0.0"
|
||||||
|
|
||||||
|
"@graphql-tools/import@^6.6.6":
|
||||||
|
version "6.6.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/@graphql-tools/import/-/import-6.6.6.tgz#a4ff216e6b8a49c392bb8a4378d4e9caf2b303d7"
|
||||||
|
integrity sha512-a0aVajxqu1MsL8EwavA44Osw20lBOIhq8IM2ZIHFPP62cPAcOB26P+Sq57DHMsSyX5YQ0ab9XPM2o4e1dQhs0w==
|
||||||
|
dependencies:
|
||||||
|
"@graphql-tools/utils" "8.6.2"
|
||||||
|
resolve-from "5.0.0"
|
||||||
|
tslib "~2.3.0"
|
||||||
|
|
||||||
|
"@graphql-tools/load@^7.5.2":
|
||||||
|
version "7.5.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@graphql-tools/load/-/load-7.5.2.tgz#0e46129f412bd038ac56996083458c1b8828526f"
|
||||||
|
integrity sha512-URPqVP77mYxdZxT895DzrWf2C23S3yC/oAmXD4D4YlxR5eVVH/fxu0aZR78WcEKF331fWSiFwWy9j7BZWvkj7g==
|
||||||
|
dependencies:
|
||||||
|
"@graphql-tools/schema" "8.3.2"
|
||||||
|
"@graphql-tools/utils" "^8.6.2"
|
||||||
|
p-limit "3.1.0"
|
||||||
|
tslib "~2.3.0"
|
||||||
|
|
||||||
"@graphql-tools/merge@^8.2.3":
|
"@graphql-tools/merge@^8.2.3":
|
||||||
version "8.2.3"
|
version "8.2.3"
|
||||||
resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.2.3.tgz#a2861fec230ee7be9dc42d72fed2ac075c31669f"
|
resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.2.3.tgz#a2861fec230ee7be9dc42d72fed2ac075c31669f"
|
||||||
@@ -2125,7 +2173,7 @@
|
|||||||
"@graphql-tools/utils" "^8.6.2"
|
"@graphql-tools/utils" "^8.6.2"
|
||||||
tslib "~2.3.0"
|
tslib "~2.3.0"
|
||||||
|
|
||||||
"@graphql-tools/schema@^8.3.2":
|
"@graphql-tools/schema@8.3.2", "@graphql-tools/schema@^8.2.0", "@graphql-tools/schema@^8.3.2":
|
||||||
version "8.3.2"
|
version "8.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-8.3.2.tgz#5b949d7a2cc3936f73507d91cc609996f1266d11"
|
resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-8.3.2.tgz#5b949d7a2cc3936f73507d91cc609996f1266d11"
|
||||||
integrity sha512-77feSmIuHdoxMXRbRyxE8rEziKesd/AcqKV6fmxe7Zt+PgIQITxNDew2XJJg7qFTMNM43W77Ia6njUSBxNOkwg==
|
integrity sha512-77feSmIuHdoxMXRbRyxE8rEziKesd/AcqKV6fmxe7Zt+PgIQITxNDew2XJJg7qFTMNM43W77Ia6njUSBxNOkwg==
|
||||||
@@ -2135,7 +2183,7 @@
|
|||||||
tslib "~2.3.0"
|
tslib "~2.3.0"
|
||||||
value-or-promise "1.0.11"
|
value-or-promise "1.0.11"
|
||||||
|
|
||||||
"@graphql-tools/utils@^8.6.2":
|
"@graphql-tools/utils@8.6.2", "@graphql-tools/utils@^8.6.2":
|
||||||
version "8.6.2"
|
version "8.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-8.6.2.tgz#095408135f091aac68fe18a0a21b708e685500da"
|
resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-8.6.2.tgz#095408135f091aac68fe18a0a21b708e685500da"
|
||||||
integrity sha512-x1DG0cJgpJtImUlNE780B/dfp8pxvVxOD6UeykFH5rHes26S4kGokbgU8F1IgrJ1vAPm/OVBHtd2kicTsPfwdA==
|
integrity sha512-x1DG0cJgpJtImUlNE780B/dfp8pxvVxOD6UeykFH5rHes26S4kGokbgU8F1IgrJ1vAPm/OVBHtd2kicTsPfwdA==
|
||||||
@@ -4518,6 +4566,11 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@types/yup/-/yup-0.29.11.tgz#d654a112973f5e004bf8438122bd7e56a8e5cd7e"
|
resolved "https://registry.yarnpkg.com/@types/yup/-/yup-0.29.11.tgz#d654a112973f5e004bf8438122bd7e56a8e5cd7e"
|
||||||
integrity sha512-9cwk3c87qQKZrT251EDoibiYRILjCmxBvvcb4meofCmx1vdnNcR9gyildy5vOHASpOKMsn42CugxUvcwK5eu1g==
|
integrity sha512-9cwk3c87qQKZrT251EDoibiYRILjCmxBvvcb4meofCmx1vdnNcR9gyildy5vOHASpOKMsn42CugxUvcwK5eu1g==
|
||||||
|
|
||||||
|
"@types/zen-observable@0.8.3":
|
||||||
|
version "0.8.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.3.tgz#781d360c282436494b32fe7d9f7f8e64b3118aa3"
|
||||||
|
integrity sha512-fbF6oTd4sGGy0xjHPKAt+eS2CrxJ3+6gQ3FGcBoIJR2TLAyCkCyI8JqZNy+FeON0AhVgNJoUumVoZQjBFUqHkw==
|
||||||
|
|
||||||
"@typescript-eslint/eslint-plugin@^4.31.2":
|
"@typescript-eslint/eslint-plugin@^4.31.2":
|
||||||
version "4.33.0"
|
version "4.33.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276"
|
||||||
@@ -9543,6 +9596,16 @@ graphql-tag@^2.12.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
tslib "^2.1.0"
|
tslib "^2.1.0"
|
||||||
|
|
||||||
|
graphql-tools@^8.2.0:
|
||||||
|
version "8.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-8.2.0.tgz#493edc2760469f39d8334c6f20aa75ae91a7ab86"
|
||||||
|
integrity sha512-9axT/0exEzVCk+vMPykOPannlrA4VQNo6nuWgh25IJ5arPf92OKxvjSHAbm7dQIFmcWxE0hVvyD2rWHjDqZCgQ==
|
||||||
|
dependencies:
|
||||||
|
"@graphql-tools/schema" "^8.2.0"
|
||||||
|
tslib "~2.3.0"
|
||||||
|
optionalDependencies:
|
||||||
|
"@apollo/client" "~3.2.5 || ~3.3.0 || ~3.4.0"
|
||||||
|
|
||||||
graphql-type-json@^0.3.2:
|
graphql-type-json@^0.3.2:
|
||||||
version "0.3.2"
|
version "0.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/graphql-type-json/-/graphql-type-json-0.3.2.tgz#f53a851dbfe07bd1c8157d24150064baab41e115"
|
resolved "https://registry.yarnpkg.com/graphql-type-json/-/graphql-type-json-0.3.2.tgz#f53a851dbfe07bd1c8157d24150064baab41e115"
|
||||||
@@ -12819,6 +12882,13 @@ normalize-package-data@^3.0.0, normalize-package-data@^3.0.2, normalize-package-
|
|||||||
semver "^7.3.4"
|
semver "^7.3.4"
|
||||||
validate-npm-package-license "^3.0.1"
|
validate-npm-package-license "^3.0.1"
|
||||||
|
|
||||||
|
normalize-path@^2.1.1:
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
|
||||||
|
integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=
|
||||||
|
dependencies:
|
||||||
|
remove-trailing-separator "^1.0.1"
|
||||||
|
|
||||||
normalize-path@^3.0.0, normalize-path@~3.0.0:
|
normalize-path@^3.0.0, normalize-path@~3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
|
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
|
||||||
@@ -13323,6 +13393,13 @@ p-finally@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
|
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
|
||||||
integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
|
integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
|
||||||
|
|
||||||
|
p-limit@3.1.0, p-limit@^3.0.2:
|
||||||
|
version "3.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
|
||||||
|
integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==
|
||||||
|
dependencies:
|
||||||
|
yocto-queue "^0.1.0"
|
||||||
|
|
||||||
p-limit@^1.1.0:
|
p-limit@^1.1.0:
|
||||||
version "1.3.0"
|
version "1.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
|
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
|
||||||
@@ -13337,13 +13414,6 @@ p-limit@^2.0.0, p-limit@^2.2.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
p-try "^2.0.0"
|
p-try "^2.0.0"
|
||||||
|
|
||||||
p-limit@^3.0.2:
|
|
||||||
version "3.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
|
|
||||||
integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==
|
|
||||||
dependencies:
|
|
||||||
yocto-queue "^0.1.0"
|
|
||||||
|
|
||||||
p-locate@^2.0.0:
|
p-locate@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
|
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
|
||||||
@@ -15657,16 +15727,16 @@ resolve-cwd@^3.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
resolve-from "^5.0.0"
|
resolve-from "^5.0.0"
|
||||||
|
|
||||||
|
resolve-from@5.0.0, resolve-from@^5.0.0:
|
||||||
|
version "5.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
|
||||||
|
integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
|
||||||
|
|
||||||
resolve-from@^4.0.0:
|
resolve-from@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
|
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
|
||||||
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
|
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
|
||||||
|
|
||||||
resolve-from@^5.0.0:
|
|
||||||
version "5.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
|
|
||||||
integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
|
|
||||||
|
|
||||||
resolve-pathname@^3.0.0:
|
resolve-pathname@^3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd"
|
resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd"
|
||||||
@@ -17397,7 +17467,7 @@ ts-custom-error@^3.2.0:
|
|||||||
resolved "https://registry.yarnpkg.com/ts-custom-error/-/ts-custom-error-3.2.0.tgz#ff8f80a3812bab9dc448536312da52dce1b720fb"
|
resolved "https://registry.yarnpkg.com/ts-custom-error/-/ts-custom-error-3.2.0.tgz#ff8f80a3812bab9dc448536312da52dce1b720fb"
|
||||||
integrity sha512-cBvC2QjtvJ9JfWLvstVnI45Y46Y5dMxIaG1TDMGAD/R87hpvqFL+7LhvUDhnRCfOnx/xitollFWWvUKKKhbN0A==
|
integrity sha512-cBvC2QjtvJ9JfWLvstVnI45Y46Y5dMxIaG1TDMGAD/R87hpvqFL+7LhvUDhnRCfOnx/xitollFWWvUKKKhbN0A==
|
||||||
|
|
||||||
ts-invariant@^0.9.4:
|
ts-invariant@^0.9.0, ts-invariant@^0.9.4:
|
||||||
version "0.9.4"
|
version "0.9.4"
|
||||||
resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.9.4.tgz#42ac6c791aade267dd9dc65276549df5c5d71cac"
|
resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.9.4.tgz#42ac6c791aade267dd9dc65276549df5c5d71cac"
|
||||||
integrity sha512-63jtX/ZSwnUNi/WhXjnK8kz4cHHpYS60AnmA6ixz17l7E12a5puCWFlNpkne5Rl0J8TBPVHpGjsj4fxs8ObVLQ==
|
integrity sha512-63jtX/ZSwnUNi/WhXjnK8kz4cHHpYS60AnmA6ixz17l7E12a5puCWFlNpkne5Rl0J8TBPVHpGjsj4fxs8ObVLQ==
|
||||||
@@ -17802,6 +17872,13 @@ universalify@^2.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
|
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
|
||||||
integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==
|
integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==
|
||||||
|
|
||||||
|
unixify@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/unixify/-/unixify-1.0.0.tgz#3a641c8c2ffbce4da683a5c70f03a462940c2090"
|
||||||
|
integrity sha1-OmQcjC/7zk2mg6XHDwOkYpQMIJA=
|
||||||
|
dependencies:
|
||||||
|
normalize-path "^2.1.1"
|
||||||
|
|
||||||
unpipe@1.0.0, unpipe@~1.0.0:
|
unpipe@1.0.0, unpipe@~1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
|
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
|
||||||
@@ -18954,6 +19031,14 @@ zen-observable-ts@^1.2.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
zen-observable "0.8.15"
|
zen-observable "0.8.15"
|
||||||
|
|
||||||
|
zen-observable-ts@~1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-1.1.0.tgz#2d1aa9d79b87058e9b75698b92791c1838551f83"
|
||||||
|
integrity sha512-1h4zlLSqI2cRLPJUHJFL8bCWHhkpuXkF+dbGkRaWjgDIG26DmzyshUMrdV/rL3UnR+mhaX4fRq8LPouq0MYYIA==
|
||||||
|
dependencies:
|
||||||
|
"@types/zen-observable" "0.8.3"
|
||||||
|
zen-observable "0.8.15"
|
||||||
|
|
||||||
zen-observable@0.8.15:
|
zen-observable@0.8.15:
|
||||||
version "0.8.15"
|
version "0.8.15"
|
||||||
resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15"
|
resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15"
|
||||||
|
Reference in New Issue
Block a user