@@ -5,9 +5,9 @@ const { hasRequiredModelScopes } = require('../utils/hasRequiredModelScopes');
55const { sanitizeOutput } = require ( '../utils/sanitizeOutput' ) ;
66
77const getCustomTypes = ( strapi , nexus ) => {
8- const { naming } = getPluginService ( strapi , 'utils' , 'graphql' ) ;
9- const { toEntityResponse } = getPluginService ( strapi , 'format' , 'graphql' ) . returnTypes ;
10- const { models } = getPluginService ( strapi , 'settingsService' ) . get ( ) ;
8+ const { naming } = getPluginService ( 'utils' , 'graphql' ) ;
9+ const { toEntityResponse } = getPluginService ( 'format' , 'graphql' ) . returnTypes ;
10+ const { models } = getPluginService ( 'settingsService' ) . get ( ) ;
1111 const { getEntityResponseName } = naming ;
1212
1313 // get all types required for findSlug query
@@ -50,7 +50,7 @@ const getCustomTypes = (strapi, nexus) => {
5050 publicationState : nexus . stringArg ( 'The publication state of the entry' ) ,
5151 } ,
5252 resolve : async ( _parent , args , ctx ) => {
53- const { models } = getPluginService ( strapi , 'settingsService' ) . get ( ) ;
53+ const { models } = getPluginService ( 'settingsService' ) . get ( ) ;
5454 const { modelName, slug, publicationState } = args ;
5555 const { auth } = ctx . state ;
5656
@@ -77,7 +77,7 @@ const getCustomTypes = (strapi, nexus) => {
7777 query . publicationState = publicationState || 'live' ;
7878 }
7979
80- const data = await getPluginService ( strapi , 'slugService' ) . findOne ( uid , query ) ;
80+ const data = await getPluginService ( 'slugService' ) . findOne ( uid , query ) ;
8181 const sanitizedEntity = await sanitizeOutput ( data , contentType , auth ) ;
8282 return toEntityResponse ( sanitizedEntity , { resourceUID : uid } ) ;
8383 } ,
0 commit comments