From 6d943bd7307692d67d9ef5614c9c04829c061493 Mon Sep 17 00:00:00 2001 From: Victor Germain Date: Thu, 23 Dec 2021 10:08:57 +0100 Subject: [PATCH 1/5] Update README.md --- README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/README.md b/README.md index f20c863..b2aac73 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,6 @@ classic use case ```js const { getCallWebhook } = require('graphql-web-hook') -... - -function getMetadataFromContext(context) { - return { userId: context.user.id } -} -... - const callWebhook = getCallWebhook(getMetadataFromContext) await callWebhook({ From cee0d149c9dc8ef6589fbba2e30df062f954d042 Mon Sep 17 00:00:00 2001 From: Victor Germain Date: Thu, 23 Dec 2021 10:09:23 +0100 Subject: [PATCH 2/5] Update README.md --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index b2aac73..76c2dd7 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,6 @@ GWH provides a flexible and simple tool to executes and manages webhooks in a Gr It is based on graphql-sequelize-generator and inspired by graphql-node-jobs. ## How to use - -classic use case - ```js const { getCallWebhook } = require('graphql-web-hook') From cdd23a066a7f8bf71c0ed34141b36967d7ff4b01 Mon Sep 17 00:00:00 2001 From: SGO34 <105852043+SGO34@users.noreply.github.com> Date: Thu, 2 Mar 2023 10:18:58 +0100 Subject: [PATCH 3/5] updated readme with links to new documentation --- README.md | 145 ++---------------------------------------------------- 1 file changed, 3 insertions(+), 142 deletions(-) diff --git a/README.md b/README.md index 76c2dd7..42604b9 100644 --- a/README.md +++ b/README.md @@ -2,147 +2,8 @@ GWH provides a flexible and simple tool to executes and manages webhooks in a GraphQL environement. -It is based on graphql-sequelize-generator and inspired by graphql-node-jobs. +It is based on [graphql-sequelize-generator](https://teamstarter.github.io/gsg-documentation/) and inspired by [graphql-node-jobs](https://teamstarter.github.io/gnj-documentation/). -## How to use -```js -const { getCallWebhook } = require('graphql-web-hook') +# Manual -const callWebhook = getCallWebhook(getMetadataFromContext) - -await callWebhook({ - evenType: 'publish', - context: { - userId: 1, - ... - }, - data: { - text: 'New post publish', - }, -}) -``` - -## How setup - -Add GWH to your repository - -``` -yarn add graphql-web-hook -``` - -Migrate models - -``` -yarn run gnj migrate -``` - -Add server apollo to your express server - -```js -const { getApolloServer } = require('graphql-web-hook') - -const webhookServer = await getApolloServer({ - dbConfig, - apolloServerOptions: { context: ({ req }) => req }, - getMetadataFromContext: (context) => { - return getUserIdFromContext(context) - }, -)} - -webhookServer.applyMiddleware({ - app, - path: '/webhook/graphql', -}) - - -app.use('/webhook', [middleware]) -``` - -## Documentation - -### getCallWebhook - -This function initializes and returns callWebhook by assigning it getMetadataFormContext function. - -**Params :** - -- **getMetadataFromContext** : function that should return the securityMetadata of a webhooks from a context. - -### callWebhook - -Function to call webhook. - -**How it works :**
- -- Retrieves webhooks according to the type of event and its security metadata -- Make request to all webhook with the associated data - -**Params :** - -- **data** : data to be sent to the webhook -- **eventType** : type of event -- **context** : context related to the event - -### getMetadataFromContext - -The purpose of this function is to return the security parameters of a webhook from a context. (It's called when you fetch a webhook) - -**Example :** - -```js -const { getApolloServer } = require('graphql-web-hook') - -... - -getApolloServer({ - ... - getMetadataFromContext: (context) => { - return getUserIdFromContext(context) - } -} -``` - -## Contributing - -### Install environnement - -yarn : - -``` - apt-get install git curl yarn - # or - brew install git curl yarn -``` - -#### Project - -``` -git clone git@github.com:teamstarter/graphql-web-hooks.git -cd graphql-web-hooks -yarn -yarn start -``` - -#### Test the migration script locally - -``` -yarn run gnj migrate ./../tests/sqliteTestConfig.js -``` - -#### Start a test server using the test database migrated previously - -``` -yarn start -``` - -#### Running the test - -``` -yarn test -``` - -Debugging a specific test - -``` -node --inspect-brk ./node_modules/jest/bin/jest.js ./tests/job.spec.js -``` +Get started with [the online documentation](https://teamstarter.github.io/gwh-documentation/) From 5e4a27812a212b45262a490f49d64ec9967b8c65 Mon Sep 17 00:00:00 2001 From: janfi Date: Thu, 29 Jun 2023 10:31:09 +0200 Subject: [PATCH 4/5] fix(events): "callWebhook" function and Add "hasWebhookForEvenType" function * fix callWebhook "include" add hasWebhookForEvenType function add test for callWebhook and hasWebhookForEvenType * update test * update build --------- Co-authored-by: JP Boris --- lib/callWebhook.js | 3 +- lib/hasWebhookForEvenType.js | 73 +++++++++++++ lib/index.js | 4 +- seeders/20210614122356-webhook.js | 5 + seeders/20210616113856-event-type.js | 10 ++ src/callWebhook.ts | 3 +- src/hasWebhookForEvenType.ts | 23 ++++ src/index.ts | 2 + tests/__snapshots__/callWebhook.spec.js.snap | 49 +++++++++ tests/__snapshots__/webhook.spec.js.snap | 4 + tests/callWebhook.spec.js | 36 ++++++- tests/hasWebhookForEvenType.spec.js | 106 +++++++++++++++++++ 12 files changed, 314 insertions(+), 4 deletions(-) create mode 100644 lib/hasWebhookForEvenType.js create mode 100644 src/hasWebhookForEvenType.ts create mode 100644 tests/hasWebhookForEvenType.spec.js diff --git a/lib/callWebhook.js b/lib/callWebhook.js index 404f713..f015eb9 100644 --- a/lib/callWebhook.js +++ b/lib/callWebhook.js @@ -54,10 +54,11 @@ function getCallWebhook(getMetadataFromContext) { where: { securityMetadata: getMetadataFromContext(context) }, - includes: [ + include: [ { model: models.header, as: 'headers' }, { model: models.eventType, + as: 'eventTypes', required: true, where: { type: [eventType, 'all'] } }, diff --git a/lib/hasWebhookForEvenType.js b/lib/hasWebhookForEvenType.js new file mode 100644 index 0000000..a8b50d3 --- /dev/null +++ b/lib/hasWebhookForEvenType.js @@ -0,0 +1,73 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +var models_1 = __importDefault(require("./models")); +function getHasWebhookForEvenType(getMetadataFromContext) { + return function hasWebhookForEvenType(_a) { + var eventType = _a.eventType, context = _a.context; + return __awaiter(this, void 0, void 0, function () { + var models, webhooks; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + models = (0, models_1["default"])({}); + return [4 /*yield*/, models.webhook.findAll({ + where: { + securityMetadata: getMetadataFromContext(context) + }, + include: [ + { + model: models.eventType, + as: 'eventTypes', + required: true, + where: { type: [eventType, 'all'] } + }, + ] + })]; + case 1: + webhooks = _b.sent(); + return [2 /*return*/, webhooks.length > 0]; + } + }); + }); + }; +} +exports["default"] = getHasWebhookForEvenType; diff --git a/lib/index.js b/lib/index.js index 2ee81af..ead15e8 100644 --- a/lib/index.js +++ b/lib/index.js @@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; exports.__esModule = true; -exports.getStandAloneServer = exports.getNewClient = exports.getCallWebhook = exports.getModels = exports.getApolloServer = void 0; +exports.hasWebhookForEvenType = exports.getStandAloneServer = exports.getNewClient = exports.getCallWebhook = exports.getModels = exports.getApolloServer = void 0; var getApolloServer_1 = __importDefault(require("./graphql/getApolloServer")); exports.getApolloServer = getApolloServer_1["default"]; var models_1 = __importDefault(require("./models")); @@ -14,3 +14,5 @@ var getNewClient_1 = __importDefault(require("./getNewClient")); exports.getNewClient = getNewClient_1["default"]; var getStandAloneServer_1 = __importDefault(require("./getStandAloneServer")); exports.getStandAloneServer = getStandAloneServer_1["default"]; +var hasWebhookForEvenType_1 = __importDefault(require("./hasWebhookForEvenType")); +exports.hasWebhookForEvenType = hasWebhookForEvenType_1["default"]; diff --git a/seeders/20210614122356-webhook.js b/seeders/20210614122356-webhook.js index 6987812..edcdf0b 100644 --- a/seeders/20210614122356-webhook.js +++ b/seeders/20210614122356-webhook.js @@ -20,6 +20,11 @@ module.exports = { url: 'https://www.google.com', securityMetadata: '{"userId":2}', }, + { + id: 3, + url: 'https://www.google.com', + securityMetadata: '{"userId":1}', + }, ].map(timestamp), {} ) diff --git a/seeders/20210616113856-event-type.js b/seeders/20210616113856-event-type.js index c7aad66..d466cfe 100644 --- a/seeders/20210616113856-event-type.js +++ b/seeders/20210616113856-event-type.js @@ -25,6 +25,16 @@ module.exports = { type: 'delete', webhookId: 2, }, + { + id: 4, + type: 'cancel', + webhookId: 3, + }, + { + id: 5, + type: 'publish', + webhookId: 3, + }, ].map(timestamp), {} ) diff --git a/src/callWebhook.ts b/src/callWebhook.ts index ddd0acb..4c08b57 100644 --- a/src/callWebhook.ts +++ b/src/callWebhook.ts @@ -10,10 +10,11 @@ export default function getCallWebhook(getMetadataFromContext: any) { where: { securityMetadata: getMetadataFromContext(context), }, - includes: [ + include: [ { model: models.header, as: 'headers' }, { model: models.eventType, + as: 'eventTypes', required: true, where: { type: [eventType, 'all'] }, }, diff --git a/src/hasWebhookForEvenType.ts b/src/hasWebhookForEvenType.ts new file mode 100644 index 0000000..63e6d26 --- /dev/null +++ b/src/hasWebhookForEvenType.ts @@ -0,0 +1,23 @@ +import { Event } from './types' +import getModels from './models' + +export default function getHasWebhookForEvenType(getMetadataFromContext: any) { + return async function hasWebhookForEvenType({ eventType, context }: Event) { + const models = getModels({}) + const webhooks = await models.webhook.findAll({ + where: { + securityMetadata: getMetadataFromContext(context), + }, + include: [ + { + model: models.eventType, + as: 'eventTypes', + required: true, + where: { type: [eventType, 'all'] }, + }, + ], + }) + + return webhooks.length > 0 + } +} diff --git a/src/index.ts b/src/index.ts index 93b0347..6b446d1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,6 +3,7 @@ import getModels from './models' import getCallWebhook from './callWebhook' import getNewClient from './getNewClient' import getStandAloneServer from './getStandAloneServer' +import hasWebhookForEvenType from './hasWebhookForEvenType' export { getApolloServer, @@ -10,4 +11,5 @@ export { getCallWebhook, getNewClient, getStandAloneServer, + hasWebhookForEvenType, } diff --git a/tests/__snapshots__/callWebhook.spec.js.snap b/tests/__snapshots__/callWebhook.spec.js.snap index e3ccfec..6ff4276 100644 --- a/tests/__snapshots__/callWebhook.spec.js.snap +++ b/tests/__snapshots__/callWebhook.spec.js.snap @@ -3,6 +3,7 @@ exports[`Test callWebhook function Can call a webhook 1`] = ` Object { "data": Object { + "eventType": "delete", "key": "value", }, "headers": Object { @@ -12,3 +13,51 @@ Object { "url": "https://www.google.com", } `; + +exports[`Test callWebhook function If there is no webhook no request made 1`] = `Array []`; + +exports[`Test callWebhook function there is 2 webhooks called for one user 1`] = ` +Array [ + Array [ + Object { + "data": Object { + "eventType": "publish", + "key": "value", + }, + "headers": Object { + "header-key-1": "header-value-1", + "header-key-2": "header-value-2", + }, + "url": "https://www.google.com", + }, + ], + Array [ + Object { + "data": Object { + "eventType": "publish", + "key": "value", + }, + "headers": Object {}, + "url": "https://www.google.com", + }, + ], +] +`; + +exports[`Test callWebhook function there is just one webhook called for one user 1`] = ` +Array [ + Array [ + Object { + "data": Object { + "eventType": "delete", + "key": "value", + }, + "headers": Object { + "header-key-1": "header-value-1", + "header-key-2": "header-value-2", + }, + "url": "https://www.google.com", + }, + ], +] +`; diff --git a/tests/__snapshots__/webhook.spec.js.snap b/tests/__snapshots__/webhook.spec.js.snap index 761da46..9c2d065 100644 --- a/tests/__snapshots__/webhook.spec.js.snap +++ b/tests/__snapshots__/webhook.spec.js.snap @@ -16,6 +16,10 @@ Object { ], "url": "https://www.google.com", }, + Object { + "headers": Array [], + "url": "https://www.google.com", + }, ], } `; diff --git a/tests/callWebhook.spec.js b/tests/callWebhook.spec.js index 1dbbfd0..5e8b4c2 100644 --- a/tests/callWebhook.spec.js +++ b/tests/callWebhook.spec.js @@ -54,10 +54,11 @@ describe('Test callWebhook function', () => { const callWebhook = getCallWebhook((context) => context) await callWebhook({ - eventType: 'publish', + eventType: 'delete', context: { userId: 1 }, data: { key: 'value', + eventType: 'delete', }, }) @@ -73,9 +74,42 @@ describe('Test callWebhook function', () => { context: { userId: 100 }, data: { key: 'value', + eventType: 'publish', }, }) expect(postRequest.mock.calls.length).toBe(0) + expect(postRequest.mock.calls).toMatchSnapshot() + }) + + it('there is just one webhook called for one user', async () => { + const callWebhook = getCallWebhook((context) => context) + + await callWebhook({ + eventType: 'delete', + context: { userId: 1 }, + data: { + key: 'value', + eventType: 'delete', + }, + }) + + expect(postRequest.mock.calls.length).toBe(1) + expect(postRequest.mock.calls).toMatchSnapshot() + }) + + it('there is 2 webhooks called for one user ', async () => { + const callWebhook = getCallWebhook((context) => context) + + await callWebhook({ + eventType: 'publish', + context: { userId: 1 }, + data: { + key: 'value', + eventType: 'publish', + }, + }) + expect(postRequest.mock.calls.length).toBe(2) + expect(postRequest.mock.calls).toMatchSnapshot() }) }) diff --git a/tests/hasWebhookForEvenType.spec.js b/tests/hasWebhookForEvenType.spec.js new file mode 100644 index 0000000..16eb3d6 --- /dev/null +++ b/tests/hasWebhookForEvenType.spec.js @@ -0,0 +1,106 @@ +const request = require('supertest') +const { Op } = require('sequelize') + +const { + migrateDatabase, + seedDatabase, + getNewServer, + models, + closeEverything, + deleteTables, + resetDatabase, +} = require('./test-database.js') +const { getNewClient, hasWebhookForEvenType } = require('../lib/index') + +// This is the maximum amount of time the band of test can run before timing-out +jest.setTimeout(600000) + +let server = null +const client = getNewClient( + `http://localhost:${process.env.PORT || 8080}/graphql` +) + +jest.mock('../lib/tools.js', () => ({ + __esModule: true, + postRequest: jest.fn(), +})) + +/** + * Starting the tests + */ +describe('Test hasWebhookForEvenType function', () => { + beforeAll(async () => { + await migrateDatabase() + await seedDatabase() + server = await getNewServer() + }) + + beforeEach(async () => { + await resetDatabase() + }) + + afterEach(async () => { + jest.clearAllMocks() + await deleteTables() + }) + + afterAll(async () => { + await closeEverything(server, models) + }) + + it('Can call a webhook', async () => { + const webhookForEvenType = hasWebhookForEvenType((context) => context) + + const result = await webhookForEvenType({ + eventType: 'delete', + context: { userId: 1 }, + data: { + key: 'value', + }, + }) + + expect(result).toBe(true) + }) + + it('If there is no webhook no request made', async () => { + const webhookForEvenType = hasWebhookForEvenType((context) => context) + + const result = await webhookForEvenType({ + eventType: 'publish', + context: { userId: 100 }, + data: { + key: 'value', + }, + }) + + expect(result).toBe(false) + }) + + it('there is just one webhook called for one user', async () => { + const webhookForEvenType = hasWebhookForEvenType((context) => context) + + const result = await webhookForEvenType({ + eventType: 'delete', + context: { userId: 1 }, + data: { + key: 'value', + }, + }) + + expect(result).toBe(true) + }) + + it('there is 2 webhooks called for one user ', async () => { + const webhookForEvenType = hasWebhookForEvenType((context) => context) + + const result = await webhookForEvenType({ + eventType: 'publish', + context: { userId: 1 }, + data: { + key: 'value', + }, + }) + + expect(result).toBe(true) + }) +}) From 4c39b7d420e1f53476f60bc201238a08bd0f2313 Mon Sep 17 00:00:00 2001 From: genouf Date: Thu, 12 Oct 2023 10:31:41 +0200 Subject: [PATCH 5/5] feat(SequelizeGeneratorPackage): package updated --- lib/graphql/getApolloServer.js | 2 +- package.json | 4 ++-- src/graphql/eventType.ts | 2 +- src/graphql/getApolloServer.ts | 2 +- src/graphql/header.ts | 2 +- src/graphql/webhook.ts | 2 +- src/migrate.ts | 2 +- yarn.lock | 37 +++++++++++++++++----------------- 8 files changed, 27 insertions(+), 26 deletions(-) diff --git a/lib/graphql/getApolloServer.js b/lib/graphql/getApolloServer.js index 49b1ee6..3d34468 100644 --- a/lib/graphql/getApolloServer.js +++ b/lib/graphql/getApolloServer.js @@ -50,7 +50,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; exports.__esModule = true; -var graphql_sequelize_generator_1 = require("graphql-sequelize-generator"); +var graphql_sequelize_generator_1 = require("@teamstarter/graphql-sequelize-generator"); var models_1 = __importDefault(require("../models")); var webhook_1 = __importDefault(require("../graphql/webhook")); var header_1 = __importDefault(require("../graphql/header")); diff --git a/package.json b/package.json index 4dcc11d..9a6584f 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@types/spdy": "^3.4.4", "express": "^4.18.2", "graphql-relay": "^0.10.0", - "graphql-sequelize-generator": "teamstarter/graphql-sequelize-generator#upgrade-apollo-10-2022", + "@teamstarter/graphql-sequelize-generator": "8.3.0", "jest": "^27.0.4", "pm2": "^5.1.0", "prettier": "^2.7.1", @@ -55,7 +55,7 @@ "@apollo/server": "^4.1.1", "graphql": "^16.6.0", "graphql-relay": "^0.10.0", - "graphql-sequelize-generator": "teamstarter/graphql-sequelize-generator#upgrade-apollo-10-2022", + "@teamstarter/graphql-sequelize-generator": "8.3.0", "graphql-sequelize": "^9.4.0", "sequelize": "^6.3.5" }, diff --git a/src/graphql/eventType.ts b/src/graphql/eventType.ts index af76ab6..b2fd6cb 100644 --- a/src/graphql/eventType.ts +++ b/src/graphql/eventType.ts @@ -2,7 +2,7 @@ import { ModelDeclarationType, SequelizeModels, InAndOutTypes, -} from 'graphql-sequelize-generator/types' +} from '@teamstarter/graphql-sequelize-generator/types' export default function WebhookConfiguration( graphqlTypes: InAndOutTypes, diff --git a/src/graphql/getApolloServer.ts b/src/graphql/getApolloServer.ts index cd9f04c..9f5ef87 100644 --- a/src/graphql/getApolloServer.ts +++ b/src/graphql/getApolloServer.ts @@ -1,7 +1,7 @@ import { generateApolloServer, generateModelTypes, -} from 'graphql-sequelize-generator' +} from '@teamstarter/graphql-sequelize-generator' import getModels from '../models' import webhook from '../graphql/webhook' import header from '../graphql/header' diff --git a/src/graphql/header.ts b/src/graphql/header.ts index 1d84cfc..769625f 100644 --- a/src/graphql/header.ts +++ b/src/graphql/header.ts @@ -2,7 +2,7 @@ import { ModelDeclarationType, SequelizeModels, InAndOutTypes, -} from 'graphql-sequelize-generator/types' +} from '@teamstarter/graphql-sequelize-generator/types' export default function HeaderConfiguration( graphqlTypes: InAndOutTypes, diff --git a/src/graphql/webhook.ts b/src/graphql/webhook.ts index aa50941..ccec79a 100644 --- a/src/graphql/webhook.ts +++ b/src/graphql/webhook.ts @@ -2,7 +2,7 @@ import { ModelDeclarationType, SequelizeModels, InAndOutTypes, -} from 'graphql-sequelize-generator/types' +} from '@teamstarter/graphql-sequelize-generator/types' import { Op } from 'sequelize' export default function WebhookConfiguration( diff --git a/src/migrate.ts b/src/migrate.ts index d457106..332fe79 100644 --- a/src/migrate.ts +++ b/src/migrate.ts @@ -1,7 +1,7 @@ import path from 'path' import fs from 'fs' import Umzug from 'umzug' -import { SequelizeModels } from 'graphql-sequelize-generator/types' +import { SequelizeModels } from '@teamstarter/graphql-sequelize-generator/types' /** * This file handles an im-memory SQLite database used for test purposes. diff --git a/yarn.lock b/yarn.lock index 205a6b0..4b8b726 100644 --- a/yarn.lock +++ b/yarn.lock @@ -978,6 +978,25 @@ dependencies: "@sinonjs/commons" "^1.7.0" +"@teamstarter/graphql-sequelize-generator@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@teamstarter/graphql-sequelize-generator/-/graphql-sequelize-generator-8.3.0.tgz#42520f7950b0703fe600cdd91f06a7e648de27ec" + integrity sha512-rQUn/TA0jMQ+FY+R776Daqu+0r2j828PVg8ABO+7XnxfEdzSqNmXuJCbrB14yO3VGIbzCQHRNjiZj5W2mjYQ6A== + dependencies: + "@apollo/server" "^4.1.1" + "@graphql-tools/schema" "^9.0.10" + "@types/debug" "^4.1.5" + "@types/express" "^4.17.14" + "@types/express-serve-static-core" "^4.17.31" + "@typescript-eslint/parser" "^4.5.0" + axios "^0.24.0" + commander "^7.2.0" + debug "^4.1.1" + graphql-subscriptions "^1.1.0" + graphql-ws "^5.11.2" + typescript "^4.8.4" + ws "^8.11.0" + "@tootallnate/once@1": version "1.1.2" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" @@ -3550,24 +3569,6 @@ graphql-relay@^0.10.0: resolved "https://registry.yarnpkg.com/graphql-relay/-/graphql-relay-0.10.0.tgz#3b661432edf1cb414cd4a132cf595350e524db2b" integrity sha512-44yBuw2/DLNEiMypbNZBt1yMDbBmyVPVesPywnteGGALiBmdyy1JP8jSg8ClLePg8ZZxk0O4BLhd1a6U/1jDOQ== -graphql-sequelize-generator@teamstarter/graphql-sequelize-generator#upgrade-apollo-10-2022: - version "7.5.1" - resolved "https://codeload.github.com/teamstarter/graphql-sequelize-generator/tar.gz/04fc2417f6b4dfe9fc83317571304868f7ca8ab4" - dependencies: - "@apollo/server" "^4.1.1" - "@graphql-tools/schema" "^9.0.10" - "@types/debug" "^4.1.5" - "@types/express" "^4.17.14" - "@types/express-serve-static-core" "^4.17.31" - "@typescript-eslint/parser" "^4.5.0" - axios "^0.24.0" - commander "^7.2.0" - debug "^4.1.1" - graphql-subscriptions "^1.1.0" - graphql-ws "^5.11.2" - typescript "^4.8.4" - ws "^8.11.0" - graphql-sequelize@^9.4.0: version "9.5.1" resolved "https://registry.yarnpkg.com/graphql-sequelize/-/graphql-sequelize-9.5.1.tgz#8906eb90c1b88a8d197ad5a9fe19ffe8879538a3"