Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.

Commit db10ee1

Browse files
Nuno VieiraJason Kuhrt
authored andcommitted
fix(cgg): default createUser name arg to null (#397)
Since version 0.5.0 of graphglgen args can be not just nullable but voidable. This more precise type introduced a type error with the existing template where a model expecting only nullable now received a voidable.
1 parent cd14864 commit db10ee1

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/graphqlgen-templates/typescript-yoga/src/generated/graphqlgen.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT.
22

33
import { GraphQLResolveInfo } from 'graphql'
4-
import { Post, User } from '../types'
5-
import { Context } from '../types'
4+
import { Post, User, Context } from '../types'
65

76
export namespace QueryResolvers {
87
export const defaultResolvers = {}

packages/graphqlgen-templates/typescript-yoga/src/schema.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ type Query {
55
}
66

77
type Mutation {
8-
createUser(name: String): User!
8+
createUser(name: String = null): User!
99
createDraft(title: String!, content: String!, authorId: ID!): Post!
1010
deletePost(id: ID!): Post
1111
publish(id: ID!): Post

0 commit comments

Comments
 (0)