@webresto/graphql 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.editorconfig +10 -0
- package/index.d.ts +3 -0
- package/index.js +22 -0
- package/index.ts +14 -0
- package/lib/afterHook.d.ts +1 -0
- package/lib/afterHook.js +24 -0
- package/lib/afterHook.ts +26 -0
- package/lib/afterHook.ts___graphql-transport-ws +138 -0
- package/lib/afterHook.ts___graphql-ws +133 -0
- package/lib/defaults.js +12 -0
- package/lib/errorWrapper.d.ts +4 -0
- package/lib/errorWrapper.js +13 -0
- package/lib/errorWrapper.ts +12 -0
- package/lib/eventHelper.d.ts +21 -0
- package/lib/eventHelper.js +32 -0
- package/lib/eventHelper.ts +35 -0
- package/lib/graphqlHelper.d.ts +115 -0
- package/lib/graphqlHelper.js +596 -0
- package/lib/graphqlHelper.ts +692 -0
- package/lib/initialize.d.ts +1 -0
- package/lib/initialize.js +22 -0
- package/lib/initialize.ts +21 -0
- package/notes.md +1976 -0
- package/package.json +47 -0
- package/readme.md +258 -0
- package/restApi.http +11 -0
- package/src/additionalResolvers.d.ts +19 -0
- package/src/additionalResolvers.js +114 -0
- package/src/additionalResolvers.ts +111 -0
- package/src/graphql.d.ts +7 -0
- package/src/graphql.js +144 -0
- package/src/graphql.ts +160 -0
- package/src/resolvers/cart.d.ts +123 -0
- package/src/resolvers/cart.js +176 -0
- package/src/resolvers/cart.ts +256 -0
- package/src/resolvers/checkout.d.ts +30 -0
- package/src/resolvers/checkout.js +226 -0
- package/src/resolvers/checkout.ts +242 -0
- package/src/resolvers/dishAndModifier.d.ts +2 -0
- package/src/resolvers/dishAndModifier.js +35 -0
- package/src/resolvers/dishAndModifier.ts +38 -0
- package/src/resolvers/maintenance.d.ts +9 -0
- package/src/resolvers/maintenance.js +12 -0
- package/src/resolvers/maintenance.ts +11 -0
- package/src/resolvers/paymentMethod.d.ts +9 -0
- package/src/resolvers/paymentMethod.js +22 -0
- package/src/resolvers/paymentMethod.ts +20 -0
- package/src/resolvers/restrictions.d.ts +9 -0
- package/src/resolvers/restrictions.js +24 -0
- package/src/resolvers/restrictions.ts +22 -0
- package/src/resolvers/streets.d.ts +9 -0
- package/src/resolvers/streets.js +16 -0
- package/src/resolvers/streets.ts +13 -0
- package/src/resolvers/subscriptions.d.ts +33 -0
- package/src/resolvers/subscriptions.js +52 -0
- package/src/resolvers/subscriptions.ts +63 -0
- package/test/.eslintrc +8 -0
- package/test/_bootstrap.js +29 -0
- package/test/fixtures/v0.12-app/.gitignore +11 -0
- package/test/fixtures/v0.12-app/.sailsrc +11 -0
- package/test/fixtures/v0.12-app/api/controllers/.gitkeep +0 -0
- package/test/fixtures/v0.12-app/api/models/.gitkeep +0 -0
- package/test/fixtures/v0.12-app/api/models/TestModel.js +22 -0
- package/test/fixtures/v0.12-app/api/responses/badRequest.js +76 -0
- package/test/fixtures/v0.12-app/api/responses/created.js +60 -0
- package/test/fixtures/v0.12-app/api/responses/forbidden.js +89 -0
- package/test/fixtures/v0.12-app/api/responses/notFound.js +94 -0
- package/test/fixtures/v0.12-app/api/responses/ok.js +60 -0
- package/test/fixtures/v0.12-app/api/responses/serverError.js +89 -0
- package/test/fixtures/v0.12-app/api/services/.gitkeep +0 -0
- package/test/fixtures/v0.12-app/app.js +73 -0
- package/test/fixtures/v0.12-app/config/bootstrap.js +6 -0
- package/test/fixtures/v0.12-app/config/connections.js +5 -0
- package/test/fixtures/v0.12-app/config/cors.js +78 -0
- package/test/fixtures/v0.12-app/config/csrf.js +64 -0
- package/test/fixtures/v0.12-app/config/env/development.js +10 -0
- package/test/fixtures/v0.12-app/config/env/production.js +16 -0
- package/test/fixtures/v0.12-app/config/globals.js +63 -0
- package/test/fixtures/v0.12-app/config/hookTimeout.js +8 -0
- package/test/fixtures/v0.12-app/config/http.js +93 -0
- package/test/fixtures/v0.12-app/config/i18n.js +57 -0
- package/test/fixtures/v0.12-app/config/log.js +29 -0
- package/test/fixtures/v0.12-app/config/models.js +3 -0
- package/test/fixtures/v0.12-app/config/policies.js +51 -0
- package/test/fixtures/v0.12-app/config/restoapi.js +3 -0
- package/test/fixtures/v0.12-app/config/restocore.js +39 -0
- package/test/fixtures/v0.12-app/config/routes.js +49 -0
- package/test/fixtures/v0.12-app/config/session.js +100 -0
- package/test/fixtures/v0.12-app/config/sockets.js +141 -0
- package/test/fixtures/v0.12-app/config/stateflow.js +4 -0
- package/test/fixtures/v0.12-app/config/views.js +95 -0
- package/test/fixtures/v0.12-app/package.json +34 -0
- package/test/fixtures/v0.12-app/views/403.ejs +68 -0
- package/test/fixtures/v0.12-app/views/404.ejs +68 -0
- package/test/fixtures/v0.12-app/views/500.ejs +73 -0
- package/test/fixtures/v0.12-app/views/homepage.ejs +74 -0
- package/test/fixtures/v0.12-app/views/layout.ejs +91 -0
- package/test/mocha.opts +2 -0
- package/test/readme.md +0 -0
- package/test/todo +0 -0
- package/test/tslint.json +18 -0
- package/test/unit/first.test.js +11 -0
- package/test/unit/sails_not_crash.test.js +3 -0
- package/todo.md +1 -0
- package/tsconfig.json +10 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
import HookTools from "@webresto/core/libs/hookTools";
|
2
|
+
import afterHook from "@webresto/graphql/lib/afterHook";
|
3
|
+
|
4
|
+
export default function ToInitialize() {
|
5
|
+
/**
|
6
|
+
* List of hooks that required
|
7
|
+
*/
|
8
|
+
const requiredHooks = [
|
9
|
+
'restocore'
|
10
|
+
];
|
11
|
+
|
12
|
+
return function initialize(cb) {
|
13
|
+
/**
|
14
|
+
* AFTER OTHERS HOOKS
|
15
|
+
*/
|
16
|
+
sails.log.info('>>> graphql hook - initialize');
|
17
|
+
HookTools.waitForHooks('graphql', requiredHooks, afterHook);
|
18
|
+
|
19
|
+
return cb();
|
20
|
+
}
|
21
|
+
};
|