Ash Berlin-Taylor
02/01/2019, 3:26 PMawait prisma.createUser(mutation) and prisma.createUser(mutation).id() -- or what that was doing, and why the examples (in the codesandbox) all return plain objectsnuno
02/01/2019, 3:33 PMAsh Berlin-Taylor
02/01/2019, 3:36 PMAsh Berlin-Taylor
02/01/2019, 3:36 PMnuno
02/01/2019, 3:58 PMnikolasburk
nuno
02/01/2019, 4:13 PMnuno
02/01/2019, 4:15 PMawait ctx.prisma.createUser(data).username()
get an error
Error: Field 'username' of type 'String' must not have a sub selection. (line 3, column 5):
username {
^
at BatchedGraphQLClient.<anonymous> (/usr/src/app/node_modules/http-link-dataloader/src/BatchedGraphQLClient.ts:74:13)
at step (/usr/src/app/node_modules/http-link-dataloader/dist/src/BatchedGraphQLClient.js:40:23)
at Object.next (/usr/src/app/node_modules/http-link-dataloader/dist/src/BatchedGraphQLClient.js:21:53)
at fulfilled (/usr/src/app/node_modules/http-link-dataloader/dist/src/BatchedGraphQLClient.js:12:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
could this be an issue with prisma-client?Ash Berlin-Taylor
02/01/2019, 4:36 PMAsh Berlin-Taylor
02/01/2019, 4:36 PMAsh Berlin-Taylor
02/01/2019, 4:39 PMconst newUser = prisma.createUser({
name: 'Alice',
email: '<mailto:alice@prisma.io|alice@prisma.io>',
})
console.log(`Id `, await newUser.id())