@tripzapp/shared-typings
v1.0.1-35
Published
Shared declarations used across TripZapp typescript codebase.
Readme
TripZapp Typings
This repository holds shared type declarations used across TripZapp typescript codebase.
Installation
Use the npm package manager to install.
npm install @tripzapp/shared-typings --save-devUsage
// partner.ts - example mutation file
import { User } from "@tripzapp/shared-typings";
export default async (
_: User.BaseUser,
args: void,
{ prisma }: GraphQLContext,
info: any
) => {
try {
if (_.userType === User.Type.Partner)
return await prisma.partnerDetails.findOne({
where: { id: _.id },
});
} catch (err) {
throw err;
}
};Contributing
Before pushing any updates to this repo, if you haven't already, add your name and email in the index.ts.
Please make sure to update tests as appropriate.