playra
12/19/2017, 7:06 PMjlengstorf
12/19/2017, 7:25 PMnilan
12/19/2017, 7:46 PMplayra
12/19/2017, 7:53 PMrein
12/19/2017, 7:57 PMplayra
12/19/2017, 8:55 PMuser
12/19/2017, 9:00 PMhttps://prisma.slack.com/files/U63BKR7S9/F8H0PC7FD/__________________________2017-12-19____23.52.48.png▾
js
async writePost(parent, { title, text }, ctx, info) {
const authorId = getUserId(ctx)
return ctx.db.mutation.createPost(
{
data: {
title,
text,
isPublished: true,
author: {
connect: { id: authorId },
},
},
},
info,
)
}
You should try the basic project from the @beta release.Joe Strouth
12/20/2017, 12:50 AMphilip
12/20/2017, 1:02 AMjferrettiboke
12/20/2017, 2:02 AMportenez
12/20/2017, 4:27 AMgraphql get-schema -e default
, and my schema has comments/docs, then the generated schema is malformed. Or am I doing something wrong?portenez
12/20/2017, 4:39 AMget-schema
malformed output:
https://github.com/graphql-cli/graphql-cli/issues/70Saif
12/20/2017, 6:36 AMm.b.iqbal
12/20/2017, 7:13 AMrajit
12/20/2017, 10:33 AM@migrationValue
in your types.graphql
as you move from dev to production? In dev it resets the values in my database everytime I run gc deploy
. Are you just putting up with that and then remembering to remove them all after your first production deploy?kdichev
12/20/2017, 10:34 AMdzim
12/20/2017, 11:44 AMrein
12/20/2017, 2:16 PMnikolasburk
Post
type is imported from the database schema so it doesn’t have to be redefined (https://github.com/graphql-boilerplates/node-graphql-server/blob/master/advanced/src/schema.graphql#L1). the User
type is “redefined” by without the password
field to not expose it through the APIMaslov
12/20/2017, 2:19 PMrein
12/20/2017, 2:21 PMrein
12/20/2017, 2:31 PMkdieubenit
12/20/2017, 3:28 PMkdieubenit
12/20/2017, 3:28 PMnilan
12/20/2017, 3:29 PMkdieubenit
12/20/2017, 3:29 PMkdieubenit
12/20/2017, 3:30 PMPhil
12/20/2017, 3:48 PMAryeh
12/20/2017, 4:02 PMnull
and undefined
so I can’t just set the property of the item I want to delete to say null
.
What do you guys thing about passing an array of items to delete along with whatever input to update in the mutation?
Thank you for any advice!Hinrichs
12/20/2017, 5:19 PMgraphcool deploy
on Ubuntu?
FetchError: request to <https://api.graph.cool/system> failed, reason: socket hang up
at ClientRequest.<anonymous> (/home/jekporkins/.nvm/versions/node/v9.2.1/lib/node_modules/graphcool/node_modules/node-fetch/index.js:133:11)
at ClientRequest.emit (events.js:159:13)
at TLSSocket.socketOnEnd (_http_client.js:423:9)
at TLSSocket.emit (events.js:164:20)
at endReadableNT (_stream_readable.js:1054:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
Exiting with code: 1