Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { createJSAccountsGraphQL } from '@accounts/graphql-api';
import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas';
// queries
import * as oauthProviders from './oauthProviders';
// types
import * as OauthProviderType from './OauthProvider-type';
import { AccountsServer } from '../../../../accounts';
const accountsGraphQL = createJSAccountsGraphQL(AccountsServer);
export const schema = mergeTypes([
accountsGraphQL.schema,
oauthProviders.schema,
OauthProviderType.schema,
]);
export const resolvers = mergeResolvers([
accountsGraphQL.extendWithResolvers({}),
oauthProviders.resolver,
]);
import * as channels from './channels';
import * as channelByName from './channelByName';
import * as directChannel from './directChannel';
import * as channelsByUser from './channelsByUser';
// mutations
import * as createChannel from './createChannel';
import * as leaveChannel from './leaveChannel';
import * as hideChannel from './hideChannel';
// types
import * as ChannelType from './Channel-type';
import * as ChannelSort from './ChannelSort-enum';
import * as ChannelFilter from './ChannelFilter-input';
import * as Privacy from './Privacy-enum';
import * as ChannelNameAndDirect from './ChannelNameAndDirect-input';
export const schema = mergeTypes([
// queries
channels.schema,
channelByName.schema,
directChannel.schema,
channelsByUser.schema,
// mutations
createChannel.schema,
leaveChannel.schema,
hideChannel.schema,
// types
ChannelType.schema,
ChannelSort.schema,
ChannelFilter.schema,
Privacy.schema,
ChannelNameAndDirect.schema,
]);
import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas';
// mutations
import * as setStatus from './setStatus';
// types
import * as UserType from './User-type';
import * as UserStatus from './UserStatus-enum';
export const schema = mergeTypes([
// mutations
setStatus.schema,
// types
UserType.schema,
UserStatus.schema,
]);
export const resolvers = mergeResolvers([
// mutations
setStatus.resolver,
// types
UserType.resolver,
]);
import { createJSAccountsGraphQL } from '@accounts/graphql-api';
import { AccountsServer } from 'meteor/rocketchat:accounts';
import { mergeTypes, mergeResolvers } from 'merge-graphql-schemas';
// queries
import * as oauthProviders from './oauthProviders';
// types
import * as OauthProviderType from './OauthProvider-type';
const accountsGraphQL = createJSAccountsGraphQL(AccountsServer);
export const schema = mergeTypes([
accountsGraphQL.schema,
oauthProviders.schema,
OauthProviderType.schema,
]);
export const resolvers = mergeResolvers([
accountsGraphQL.extendWithResolvers({}),
oauthProviders.resolver,
]);
_loadTypes () {
ResolverManager.schemas.forEach(schema => {
this._schemas.push(schema.transform())
})
this.$schemas = mergeTypes(this._schemas)
}
async buildOnlySchema() {
const schemaTypes = this.loadSchemaTypes();
return makeExecutableSchema({
typeDefs: "scalar Date \r\n scalar Upload \r\n" + mergeTypes(schemaTypes) + "\r\n" + (this.options.customTypeDefs || ""),
});
}
const { mergeTypes } = require('merge-graphql-schemas')
const NoteSchema = require('./note.schema')
const UserSchema = require('./user.schema')
const CommonSchema = require('./common.schema')
const schemas = [
NoteSchema,
UserSchema,
CommonSchema
]
module.exports = mergeTypes(schemas, { all: true })
(function (global, module) {
const {mergeTypes} = require("merge-graphql-schemas");
const Record = require("./Record/index");
const typeDefs = [Record];
module.exports = mergeTypes(typeDefs, {all: true});
}(this, module));
import path from 'path';
import { makeExecutableSchema } from 'graphql-tools';
import { fileLoader, mergeResolvers, mergeTypes } from 'merge-graphql-schemas';
const allTypes = fileLoader(path.join(__dirname, 'api/**/*.graphql'));
const allResolvers = fileLoader(path.join(__dirname, 'api/**/*.js'));
const schema = makeExecutableSchema({
typeDefs: mergeTypes(allTypes),
resolvers: mergeResolvers(allResolvers),
});
export default schema;
import path from "path";
import { makeExecutableSchema } from 'graphql-tools';
import { fileLoader, mergeTypes, mergeResolvers } from 'merge-graphql-schemas';
const typesArray = fileLoader(path.join(__dirname, '../types'), { recursive: true });
const resolversArray = fileLoader(path.join(__dirname, '../resolvers'));
const allTypes = mergeTypes(typesArray);
const allResolvers = mergeResolvers(resolversArray);
const schema = makeExecutableSchema({
typeDefs: allTypes,
resolvers: allResolvers
});
export default schema;