import { GraphQLSchemaPlugin } from "@webiny/handler-graphql/plugins/GraphQLSchemaPlugin" ; import { CmsContext } from "~/types" ; import contentModels from "./schema/contentModels" ; import contentEntries from "./schema/contentEntries" ; import contentModelGroups from "./schema/contentModelGroups" ; import baseSchema from "./schema/baseSchema" ; import { generateSchemaPlugins } from "./schema/schemaPlugins" ; /**
 * This factory is called whenever we need to generate graphql-schema plugins using the current context.
 */ export default async ( context ) : Promise < GraphQLSchemaPlugin < CmsContext > [ ] > => { return [ baseSchema ( context ) , contentModels ( context ) , contentEntries ( context ) , contentModelGroups ( context ) , ... ( await generateSchemaPlugins ( context ) ) ] . filter ( Boolean ) ; } ;