MCPcopy
hub / github.com/ever-co/ever-demand / createSchema

Method createSchema

packages/core/src/app.module.ts:264–285  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

262 See also code in https://github.com/nestjs/graphql/blob/master/lib/graphql.module.ts how it's done by Nest
263 */
264 createSchema(): GraphQLSchema {
265 const graphqlPath = './**/*.graphql';
266
267 console.log(`Searching for *.graphql files`);
268
269 const typesArray = loadFilesSync(graphqlPath);
270
271 const typeDefs = mergeTypes(typesArray, { all: true });
272
273 // we can save all GraphQL types into one file for later usage by other systems
274 // import { writeFileSync } from 'fs';
275 // writeFileSync('./all.graphql', typeDefs);
276
277 const schema = makeExecutableSchema({
278 typeDefs,
279 resolvers: {
280 ...SCALARS,
281 },
282 });
283
284 return schema;
285 }
286}

Callers

nothing calls this directly

Calls 2

mergeTypesFunction · 0.85
logMethod · 0.80

Tested by

no test coverage detected