Skip to content

Instantly share code, notes, and snippets.

@phanviet
Created March 17, 2020 04:16
Show Gist options
  • Save phanviet/9b5234f849411df5897731f285115aeb to your computer and use it in GitHub Desktop.
Save phanviet/9b5234f849411df5897731f285115aeb to your computer and use it in GitHub Desktop.
export { TemplateSentError, Unauthorized, ValidateError } from './errors';
import { generalUtils } from './general-utils';
import { dynamodbUtils } from './dynamodb-utils';
import { listUtils } from './list-utils';
import { mapUtils } from './map-utils';
import { rdsUtils } from './rds-utils';
import { transformUtils } from './transform';
import { time } from './time';
import { GraphQLResolveInfo } from 'graphql';
export function create(errors = [], now: Date = new Date(), info: GraphQLResolveInfo) {
return {
...generalUtils,
dynamodb: dynamodbUtils,
list: listUtils,
map: mapUtils,
rds: rdsUtils,
transform: transformUtils,
now,
errors,
info,
time: time(),
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment