Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.lists = {};
this.listsArray = [];
this.getListByKey = key => this.lists[key];
this._extendedTypes = [];
this._extendedQueries = [];
this._extendedMutations = [];
this._graphQLQuery = {};
this._cookieSecret = cookieSecret;
this._secureCookies = secureCookies;
this._cookieMaxAge = cookieMaxAge;
this._sessionStore = sessionStore;
this.eventHandlers = { onConnect };
this.registeredTypes = new Set();
this._schemaNames = schemaNames;
this.appVersion = appVersion;
this.appVersion.access = parseCustomAccess({
access: this.appVersion.access,
schemaNames: this._schemaNames,
defaultAccess: true,
});
if (adapters) {
this.adapters = adapters;
this.defaultAdapter = defaultAdapter;
} else if (adapter) {
this.adapters = { [adapter.constructor.name]: adapter };
this.defaultAdapter = adapter.constructor.name;
} else {
throw new Error('No database adapter provided');
}
this.queryLimits = {
const _parseAccess = obj => ({
...obj,
access: parseCustomAccess({
access: obj.access,
schemaNames: this._schemaNames,
defaultAccess: this.defaultAccess.custom,
}),
});