mirror of
https://github.com/strapi/strapi.git
synced 2025-08-24 08:38:52 +00:00
Don't remove Subscription type if subscriptions are disabled
This commit is contained in:
parent
a7592e04a9
commit
cf96129d7c
@ -25,7 +25,6 @@ const introspectionQueries = [
|
||||
* @return {GraphQLSchema}
|
||||
*/
|
||||
const wrapResolvers = ({ schema, strapi, extension = {} }) => {
|
||||
const { config: graphQLConfig } = strapi.plugin('graphql');
|
||||
// Get all the registered resolvers configuration
|
||||
const { resolversConfig = {} } = extension;
|
||||
|
||||
@ -34,10 +33,6 @@ const wrapResolvers = ({ schema, strapi, extension = {} }) => {
|
||||
|
||||
const typeMap = schema.getTypeMap();
|
||||
|
||||
if (!graphQLConfig('subscriptions')) {
|
||||
delete typeMap.Subscription;
|
||||
}
|
||||
|
||||
Object.entries(typeMap).forEach(([type, definition]) => {
|
||||
const isGraphQLObjectType = definition instanceof GraphQLObjectType;
|
||||
const isIgnoredType = introspectionQueries.includes(type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user