@@ -36,8 +36,7 @@ test('creates a loader for unique indexes', (t) => {
3636
3737import {
3838 getByIds,
39- getByIdsUsingJoiningTable,
40- NotFoundError
39+ getByIdsUsingJoiningTable
4140} from 'postloader';
4241import DataLoader from 'dataloader';
4342import type {
@@ -58,7 +57,7 @@ export type LoadersType = {|
5857
5958export const createLoaders = (connection: DatabaseConnectionType): LoadersType => {
6059 const FooByBarLoader = new DataLoader((ids) => {
61- return getByIds(connection, 'foo', ids, 'bar', '"bar"', false, NotFoundError );
60+ return getByIds(connection, 'foo', ids, 'bar', '"bar"', false);
6261 });
6362
6463 return {
@@ -101,8 +100,7 @@ test('creates a loader for unique indexes (uses mappedTableName when available)'
101100
102101import {
103102 getByIds,
104- getByIdsUsingJoiningTable,
105- NotFoundError
103+ getByIdsUsingJoiningTable
106104} from 'postloader';
107105import DataLoader from 'dataloader';
108106import type {
@@ -123,7 +121,7 @@ export type LoadersType = {|
123121
124122export const createLoaders = (connection: DatabaseConnectionType): LoadersType => {
125123 const BazByBarLoader = new DataLoader((ids) => {
126- return getByIds(connection, 'foo', ids, 'bar', '"bar"', false, NotFoundError );
124+ return getByIds(connection, 'foo', ids, 'bar', '"bar"', false);
127125 });
128126
129127 return {
@@ -157,8 +155,7 @@ test('creates a loader for _id columns', (t) => {
157155
158156import {
159157 getByIds,
160- getByIdsUsingJoiningTable,
161- NotFoundError
158+ getByIdsUsingJoiningTable
162159} from 'postloader';
163160import DataLoader from 'dataloader';
164161import type {
@@ -179,7 +176,7 @@ export type LoadersType = {|
179176
180177export const createLoaders = (connection: DatabaseConnectionType): LoadersType => {
181178 const BazsByBarIdLoader = new DataLoader((ids) => {
182- return getByIds(connection, 'foo', ids, 'bar_id', '"bar_id" "barId"', true, NotFoundError );
179+ return getByIds(connection, 'foo', ids, 'bar_id', '"bar_id" "barId"', true);
183180 });
184181
185182 return {
@@ -240,8 +237,7 @@ test('creates a loader for a join table', (t) => {
240237
241238import {
242239 getByIds,
243- getByIdsUsingJoiningTable,
244- NotFoundError
240+ getByIdsUsingJoiningTable
245241} from 'postloader';
246242import DataLoader from 'dataloader';
247243import type {
@@ -276,10 +272,10 @@ export type LoadersType = {|
276272
277273export const createLoaders = (connection: DatabaseConnectionType): LoadersType => {
278274 const BarFoosByBarIdLoader = new DataLoader((ids) => {
279- return getByIds(connection, 'bar_foo', ids, 'bar_id', '"bar_id" "barId", "foo_id" "fooId"', true, NotFoundError );
275+ return getByIds(connection, 'bar_foo', ids, 'bar_id', '"bar_id" "barId", "foo_id" "fooId"', true);
280276 });
281277 const BarFoosByFooIdLoader = new DataLoader((ids) => {
282- return getByIds(connection, 'bar_foo', ids, 'foo_id', '"bar_id" "barId", "foo_id" "fooId"', true, NotFoundError );
278+ return getByIds(connection, 'bar_foo', ids, 'foo_id', '"bar_id" "barId", "foo_id" "fooId"', true);
283279 });
284280 const FoosByBarIdLoader = new DataLoader((ids) => {
285281 return getByIdsUsingJoiningTable(connection, 'bar_foo', 'foo', 'foo', 'bar', 'r2."id"', ids);
0 commit comments