Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'query',
)}${query}}
type Mutation {${shadowCRUD.mutation &&
this.formatGQL(
shadowCRUD.mutation,
resolver.Mutation,
null,
'mutation',
)}${mutation}}
${Types.addCustomScalar(resolvers)}
${Types.addInput()}
${polymorphicDef}
`;
// 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,
};
'query',
)}${query}}
type Mutation {${shadowCRUD.mutation &&
this.formatGQL(
shadowCRUD.mutation,
resolver.Mutation,
null,
'mutation',
)}${mutation}}
${Types.addCustomScalar(resolvers)}
${Types.addInput()}
${polymorphicDef}
`;
// 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,
};
type Mutation {${shadowCRUD.mutation &&
this.formatGQL(
shadowCRUD.mutation,
resolver.Mutation,
null,
'mutation'
)}${mutation}}
${Types.addCustomScalar(resolvers)}
${Types.addInput()}
${polymorphicDef}
`;
// // 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,
};
},
_version: String
}
type Mutation {
_empty: String
}
`;
const resolvers: IResolvers = {
Query: {
_version: () => '1.0'
},
Mutation: {},
Date: DateScalar
};
const schema = makeExecutableSchema({
typeDefs: [typeDef, user.typeDef, post.typeDef, comment.typeDef, series.typeDef, tag.typeDef],
resolvers: merge(
resolvers,
user.resolvers,
post.resolvers,
comment.resolvers,
series.resolvers,
tag.resolvers
)
});
export default schema;