Skip to content

Commit 4f4c56e

Browse files
authored
Merge pull request #122 from steedos/master
Add 'graphql.invalidate' event, to invalidate GraphQL Schema manually.
2 parents 5ee36d0 + 34d9be4 commit 4f4c56e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/service.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = function (mixinOptions) {
2424
serverOptions: {},
2525
createAction: true,
2626
subscriptionEventName: "graphql.publish",
27+
invalidateEventName: "graphql.invalidate",
2728
autoUpdateSchema: true,
2829
checkActionVisibility: false,
2930
});
@@ -52,6 +53,9 @@ module.exports = function (mixinOptions) {
5253
},
5354

5455
events: {
56+
[mixinOptions.invalidateEventName]() {
57+
this.invalidateGraphQLSchema();
58+
},
5559
"$services.changed"() {
5660
if (mixinOptions.autoUpdateSchema) {
5761
this.invalidateGraphQLSchema();

0 commit comments

Comments
 (0)