sikanhe / gqtx

Code-first Typescript GraphQL Server without codegen or metaprogramming
458 stars 13 forks source link

non required field arguments are improperly typed #34

Closed n1ru4l closed 3 years ago

n1ru4l commented 3 years ago
t.field("notes", {
    type: t.NonNull(t.String),
    args: {
      first: t.arg(t.Int),
      after: t.arg(t.String)
    },
    resolve: (_, args, context) => {
     args.after // is typed as string | null but is actually undefined | null | string
    },
  })
n1ru4l commented 3 years ago

See https://github.com/sikanhe/gqtx/pull/35