Skip to content

Commit

Permalink
Update Prisma to 2.12.1 and other deps
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalLytek committed Nov 26, 2020
1 parent 29aa509 commit 09bf6b7
Show file tree
Hide file tree
Showing 11 changed files with 7,873 additions and 6,089 deletions.
8 changes: 4 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ npm i @prisma/client

> Be aware that `typegraphql-prisma` is designed to work with a selected versions of `prisma`.
>
> Please make sure you use `@prisma/cli` and `@prisma/client` of version matching `~2.11.0`.
> Please make sure you use `@prisma/cli` and `@prisma/client` of version matching `~2.12.1`.
> Otherwise, the runtime check will report an error when you run the generator.
You also need to install the GraphQL JSON scalar library (to support the Prisma `Json` scalar):
Expand Down Expand Up @@ -140,7 +140,7 @@ CRUD resolvers supports this following methods with args that are 1:1 matching w
- create
- update
- delete
- findOne
- findUnique
- findFirst
- findMany
- updateMany
Expand Down Expand Up @@ -255,7 +255,7 @@ You can also add custom queries and mutations to the schema as always, using the
export class CustomUserResolver {
@Query(returns => User, { nullable: true })
async bestUser(@Ctx() { prisma }: Context): Promise<User | null> {
return await prisma.user.findOne({
return await prisma.user.findUnique({
where: { email: "[email protected]" },
});
}
Expand Down Expand Up @@ -329,7 +329,7 @@ export class CustomUserResolver {
@Ctx() { prisma }: Context,
): Promise<Post | undefined> {
const [favoritePost] = await prisma.user
.findOne({ where: { id: user.id } })
.findUnique({ where: { id: user.id } })
.posts({ first: 1 });

return favoritePost;
Expand Down
89 changes: 44 additions & 45 deletions experiments/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions experiments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"seed": "ts-node --transpile-only ./seed.ts"
},
"dependencies": {
"@prisma/client": "2.12.0-dev.38",
"@prisma/client": "2.12.1",
"@types/graphql-fields": "^1.3.3",
"apollo-server": "^2.19.0",
"graphql": "^15.4.0",
Expand All @@ -16,10 +16,10 @@
"type-graphql": "1.1.1"
},
"devDependencies": {
"@prisma/cli": "2.12.0-dev.38",
"@prisma/cli": "2.12.1",
"@types/graphql-type-json": "^0.3.2",
"@types/node": "^14.14.8",
"@types/node": "^14.14.10",
"ts-node": "^9.0.0",
"typescript": "~4.0.5"
"typescript": "~4.1.2"
}
}
Loading

0 comments on commit 09bf6b7

Please sign in to comment.