Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createManyMutationName: `create${_listQueryName}`,
whereInputName: `${_itemQueryName}WhereInput`,
whereUniqueInputName: `${_itemQueryName}WhereUniqueInput`,
updateInputName: `${_itemQueryName}UpdateInput`,
createInputName: `${_itemQueryName}CreateInput`,
updateManyInputName: `${_listQueryName}UpdateInput`,
createManyInputName: `${_listQueryName}CreateInput`,
relateToManyInputName: `${_itemQueryName}RelateToManyInput`,
relateToOneInputName: `${_itemQueryName}RelateToOneInput`,
};
this.adapterName = adapter.name;
this.adapter = adapter.newListAdapter(this.key, adapterConfig);
this._schemaNames = schemaNames;
this.access = parseListAccess({
schemaNames: this._schemaNames,
listKey: key,
access,
defaultAccess: this.defaultAccess.list,
});
this.queryLimits = {
maxResults: Infinity,
...queryLimits,
};
if (this.queryLimits.maxResults < 1) {
throw new Error(`List ${label}'s queryLimits.maxResults can't be < 1`);
}
if (!['object', 'function', 'undefined'].includes(typeof cacheHint)) {
throw new Error(`List ${label}'s cacheHint must be an object or function`);