Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Prisma and other deps #647

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerfiles/fake-poap-api/api.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:17.4.0
FROM node:18.17.1

WORKDIR /usr/src/fake-poap-api

Expand Down
2 changes: 1 addition & 1 deletion .dockerfiles/fake-poap-auth/auth.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:17.4.0
FROM node:18.17.1

WORKDIR /usr/src/fake-poap-auth

Expand Down
2 changes: 1 addition & 1 deletion .dockerfiles/integration-tests.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.15.1
FROM node:18.17.1

WORKDIR /usr/src/integration-tests

Expand Down
2 changes: 1 addition & 1 deletion .dockerfiles/public-api-server.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.15.1
FROM node:18.17.1

WORKDIR /usr/src/server

Expand Down
2 changes: 1 addition & 1 deletion .dockerfiles/server.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.15.1
FROM node:18.17.1

WORKDIR /usr/src/server

Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"eslint.validate": ["typescript"],
"typescript.tsdk": "./node_modules/typescript/lib"
Expand Down
2 changes: 1 addition & 1 deletion aws/public-api-server.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.15.1
FROM node:18.17.1

WORKDIR /usr/src/server

Expand Down
2 changes: 1 addition & 1 deletion aws/server.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.15.1
FROM node:18.17.1

WORKDIR /usr/src/server

Expand Down
2 changes: 1 addition & 1 deletion buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 0.2
phases:
install:
runtime-versions:
nodejs: 16
nodejs: 18
commands:
- 'yarn install'
build:
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"main": "server.ts",
"license": "MIT",
"engines": {
"node": ">=16.15.1 <17"
"node": "^18.17.1"
},
"scripts": {
"copy-files": "cp src/redis/deletePrefix.lua dist/src/redis/deletePrefix.lua",
Expand Down Expand Up @@ -87,10 +87,11 @@
"@aws-sdk/client-dynamodb": "^3.142.0",
"@aws-sdk/client-s3": "^3.142.0",
"@aws-sdk/credential-provider-ini": "^3.142.0",
"@mailchimp/mailchimp_marketing": "^3.0.75",
"@prisma/client": "~4.7.1",
"@mailchimp/mailchimp_marketing": "^3.0.80",
"@prisma/client": "~5.11.0",
"@sentry/node": "^7.14.0",
"@sentry/tracing": "^7.14.0",
"@types/graphql-fields": "^1.3.9",
"badgen": "^3.2.2",
"class-validator": "^0.13.2",
"cors": "^2.8.5",
Expand All @@ -106,23 +107,23 @@
"graphql": "^15",
"graphql-fields": "^2.0.3",
"graphql-http": "^1.9.0",
"graphql-scalars": "^1.18.0",
"graphql-scalars": "^1.23.0",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.21",
"luxon": "^2.3.1",
"minimist": "^1.2.5",
"multer": "^1.4.4",
"octokit": "^2.0.10",
"postmark": "^3.0.12",
"prisma": "~4.7.1",
"prisma": "~5.11.0",
"prom-client": "^14.0.1",
"redis": "^4.0.4",
"reflect-metadata": "^0.1.13",
"segfault-handler": "^1.3.0",
"sharp": "^0.31.2",
"short-uuid": "^4.2.0",
"type-graphql": "^1.1.1",
"typegraphql-prisma": "^0.23.1",
"typegraphql-prisma": "^0.27.2",
"winston": "^3.6.0",
"zod": "^3.12.0"
},
Expand Down
2 changes: 1 addition & 1 deletion prisma/seed.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'reflect-metadata';
import { PrismaClient } from '@prisma/client';
import 'reflect-metadata';
import { seed as seedDev } from './seed-dev';
import { seed as seedTest } from './seed-test';

Expand Down
27 changes: 13 additions & 14 deletions src/graphql/resolvers/teams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@ import {
GitPOAPRequest,
NullableStringFieldUpdateOperationsInput,
StringFieldUpdateOperationsInput,
Team,
TeamOrderByWithRelationInput,
Team
} from '@generated/type-graphql';
import { GitPOAPStatus, MembershipRole } from '@prisma/client';
import { GitPOAPStatus, MembershipRole, Prisma } from '@prisma/client';
import {
Authorized,
Arg,
Authorized,
Ctx,
Field,
InputType,
ObjectType,
Resolver,
Mutation,
ObjectType,
Query,
Resolver,
} from 'type-graphql';
import { hasMembership } from '../../lib/authTokens';
import { AuthRoles } from '../auth';
Expand Down Expand Up @@ -145,16 +144,16 @@ export class CustomTeamResolver {
throw InternalError;
}

let orderBy: TeamOrderByWithRelationInput;
let orderBy;
switch (sort) {
case 'createdAt':
orderBy = { createdAt: 'asc' };
orderBy = { createdAt: Prisma.SortOrder.asc };
break;
case 'updatedAt':
orderBy = { updatedAt: 'asc' };
orderBy = { updatedAt: Prisma.SortOrder.asc };
break;
default:
orderBy = { name: 'asc' };
orderBy = { name: Prisma.SortOrder.asc };
break;
}

Expand Down Expand Up @@ -197,16 +196,16 @@ export class CustomTeamResolver {
throw InternalError;
}

let orderBy: TeamOrderByWithRelationInput;
let orderBy;
switch (sort) {
case 'createdAt':
orderBy = { createdAt: 'asc' };
orderBy = { createdAt: Prisma.SortOrder.asc };
break;
case 'updatedAt':
orderBy = { updatedAt: 'asc' };
orderBy = { updatedAt: Prisma.SortOrder.asc };
break;
default:
orderBy = { name: 'asc' };
orderBy = { name: Prisma.SortOrder.asc };
break;
}

Expand Down
Loading