strapi-plugin-slugify/server/utils/getPluginService.js
daedalus b5ef5bca40
feat: add graphql support (#8)
* feat(getPluginService): add support for any plugin

* refactor(settings): add uid model veersion to models for unified resource access

* feat: add graphql support

* chore(README): add graphql examples

* chore(strapi meta): add displayName

* chore(FindSlugResponse): update description

* fix(graphql types): ensure model exists before processing

* chore(README): incorrect title in graphql response
2022-02-22 22:19:17 -05:00

15 lines
279 B
JavaScript

'use strict';
const { pluginId } = require('./pluginId');
/**
* A helper function to obtain a plugin service
*
* @return service
*/
const getPluginService = (strapi, name, plugin = pluginId) => strapi.plugin(plugin).service(name);
module.exports = {
getPluginService,
};