Eric Reis
01/03/2021, 3:37 AMJohn Smeeth
01/05/2021, 8:32 AMJohn Smeeth
01/05/2021, 8:33 AMsven
01/05/2021, 2:08 PMVictor
01/06/2021, 7:26 PMt.model
?
See https://nexusjs.org/docs/plugins/prisma/api#null-free-lists
It mentions that it is for t.crud
but not for t.model
Daniell
01/08/2021, 3:05 PMimport type { PrismaClient } from "@prisma/client"
import type { FastifyRequest, FastifyReply } from "fastify"
export interface Context {
request: FastifyRequest
reply: FastifyReply
prisma: PrismaClient
}
// index.d.ts
import type { User } from "@prisma/client"
declare module "fastify" {
type PassportUser = User
}
Daniell
01/08/2021, 3:06 PMstephen.pearl
01/08/2021, 6:35 PMmakeSchema
method to execute during the build process?stephen.pearl
01/11/2021, 7:43 PMManthan Mallikarjun
01/13/2021, 8:04 AMnonNullDefaults: {
input: true,
output: true,
},
?Manthan Mallikarjun
01/13/2021, 8:04 AMManthan Mallikarjun
01/13/2021, 8:08 AMManthan Mallikarjun
01/13/2021, 8:09 AMString
in the prisma schema its a nonNull by default but String?
is nullable장원찬
01/13/2021, 3:08 PMstephen.pearl
01/13/2021, 3:41 PM"Nexus defaults to both inputs and outputs being nullable. This means by default your API is conservative in what it sends but flexible in what it accepts." (https://nexusjs.org/docs/guides/nullability#example-nullability-flipped-at-type-level)How is the output "conservative" since results will be null | entity? Seems like
entity
is more conservative (when setting noNull output to true.mikkelsl
01/13/2021, 4:30 PMts-node
and tsc
for build:reflection and build. If I run ts-node-dev --transpile-only
before, it will succeed.
I shouldn't have to do this during deployment. I can't find anything about this. Any idea how I can succeed with the build without a bunch of type errors?stephen.pearl
01/13/2021, 4:49 PMTimo
01/15/2021, 5:05 PMt.model
to return null instead of throwing an error (like when I use authorized
middleware)sven
01/15/2021, 5:48 PMlisten EADDRINUSE: address already in use :::4000
Any ideas?stephen.pearl
01/15/2021, 8:57 PMstephen.pearl
01/18/2021, 4:07 PMname: 'Mutation',
definition(t) {
t.crud.createOneUser({ alias: 'signupUser' })
t.crud.deleteOnePost() //what is this?
t.field('createDraft', {
type: 'Post',
args: {
title: nonNull(stringArg()),
content: stringArg(),
authorEmail: nonNull(stringArg()),
},
What's the purpose of t.crud.deleteOnePost()
?stephen.pearl
01/19/2021, 8:49 PMmikkelsl
01/21/2021, 12:05 PMCannot find module 'apollo-server-express'
It's not a problem, when I build and run locally.
This is my tsconfig.json.
{
"compilerOptions": {
"skipLibCheck": true,
"esModuleInterop": true,
"target": "es2018",
"module": "commonjs",
"strict": false,
"outDir": ".build",
"rootDir": "."
}
}
And my build/start script:
"build": "yarn build:reflection && yarn tsc",
"build:reflection": "EXIT_AFTER_REFLECT=true ts-node --transpile-only ./app",
"start": "NODE_ENV=production node .build/app",
I miss the framework already! 😄Luc
01/22/2021, 9:56 AMYan
01/22/2021, 4:17 PMYan
01/22/2021, 4:18 PMYan
01/22/2021, 4:22 PM{
"errorType": "TypeError",
"errorMessage": "Symbol.prototype [ @@toPrimitive ] requires that 'this' be a Symbol",
"stack": [
"TypeError: Symbol.prototype [ @@toPrimitive ] requires that 'this' be a Symbol",
" at Symbol.[Symbol.toPrimitive] (<anonymous>)",
" at Function.defineProperty (<anonymous>)",
" at Object.<anonymous> (/var/task/__index.js:19:8)",
" at Module._compile (internal/modules/cjs/loader.js:999:30)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)",
" at Module.load (internal/modules/cjs/loader.js:863:32)",
" at Function.Module._load (internal/modules/cjs/loader.js:708:14)",
" at Module.require (internal/modules/cjs/loader.js:887:19)",
" at require (internal/modules/cjs/helpers.js:74:18)",
" at _tryRequire (/var/runtime/UserFunction.js:75:12)"
]
}
Yan
01/22/2021, 4:23 PMmikkelsl
01/25/2021, 8:38 AMt.field('event', { type: 'Event', resolve: eventResolver })
How would I then get proper type checking for the function:
const eventsResolver = async (root, args, ctx, ...rest) => {}
stephen.pearl
01/25/2021, 2:32 PM