Skip to content

Commit

Permalink
fix: expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
AugustoCalaca committed Mar 6, 2022
1 parent b072e4b commit 03c2040
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/graphql/src/NullConnection.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export interface NullConnectionType {
edges: [];
export type NullConnectionType = {
edges: Array<any>;
count: number;
pageInfo: {
hasNextPage: boolean;
Expand All @@ -9,7 +9,7 @@ export interface NullConnectionType {
};
startCursorOffset: number;
endCursorOffset: number;
}
};

export const NullConnection: NullConnectionType = {
edges: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import { createLoader, registerDataLoader } from '@multiple-choice/graphql';

import MultipleChoiceModel, { IMultipleChoice } from './MultipleChoiceModel';

const { Wrapper: MultipleChoice, clearCache, getLoader, load, loadAll } = createLoader<IMultipleChoice>({
const {
Wrapper: MultipleChoice,
clearCache,
getLoader,
load,
loadAll,
} = createLoader<IMultipleChoice>({
loaderName: 'MultipleChoiceLoader',
model: MultipleChoiceModel,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import mongoose, { Document } from 'mongoose';

const notEmptyArray = (statements: []) => (Array.isArray(statements) && statements.length > 0 ? true : false);
const notEmptyArray = (statements: Array<string>) => Array.isArray(statements) && statements.length > 0;

const MultipleChoiceSchema = new mongoose.Schema(
{
Expand Down

0 comments on commit 03c2040

Please sign in to comment.