Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Build schema.
const schema = makeExecutableSchema({
typeDefs,
resolvers,
});
if (!strapi.config.currentEnvironment.server.production) {
// Write schema.
this.writeGenerateSchema(graphql.printSchema(schema));
}
// Remove custom scaler (like Upload);
typeDefs = Types.removeCustomScalar(typeDefs, resolvers);
return {
typeDefs: gql(typeDefs),
resolvers,
};
},
// // Build schema.
if (!strapi.config.currentEnvironment.server.production) {
// Write schema.
const schema = makeExecutableSchema({
typeDefs,
resolvers,
});
this.writeGenerateSchema(graphql.printSchema(schema));
}
// Remove custom scalar (like Upload);
typeDefs = Types.removeCustomScalar(typeDefs, resolvers);
return {
typeDefs: gql(typeDefs),
resolvers,
};
},
// Build schema.
const schema = makeExecutableSchema({
typeDefs,
resolvers,
});
if (!strapi.config.currentEnvironment.server.production) {
// Write schema.
this.writeGenerateSchema(graphql.printSchema(schema));
}
// Remove custom scaler (like Upload);
typeDefs = Types.removeCustomScalar(typeDefs, resolvers);
return {
typeDefs: gql(typeDefs),
resolvers,
};
},