import { makeExecutableSchema, addMockFunctionsToSchema, ITypeDefinitions, IMocks } from 'graphql-tools';


const createMockSchema = (typeDefs: ITypeDefinitions, mocks: IMocks) => {
    const schema = makeExecutableSchema({ typeDefs });

    addMockFunctionsToSchema({
        schema,
        mocks: mocks,
        preserveResolvers: true,
    });
    return schema;
};

export default createMockSchema;
