peter
06/26/2018, 3:26 PMgraphql-yoga
examples that show how to add routes and controllers?Jim
06/26/2018, 3:47 PMprisma deploy
?playra
06/26/2018, 4:45 PMterion
06/26/2018, 6:25 PMON DELETE RESTRICT
?? Why? There is no action, set null and cascade, but no restrict?tz
06/26/2018, 6:44 PMprismagraphlq/prisma-prod
docker image , is this what I am supposed to use for production deployment?Chris H
06/26/2018, 7:55 PMVariable '$_input' cannot be non input type 'SetCloudSecretInput!'. (line 1, column 20): mutation ($_input: SetCloudSecretInput!) { ^ Unknown type 'SetCloudSecretInput'. (line 1, column 20): mutation ($_input: SetCloudSecretInput!) { ^ Cannot query field 'setCloudSecret' on type 'Mutation'. (line 2, column 3): setCloudSecret(input: $_input) { ^
I can access the Prisma instance and create a service from prisma init
without a hitch but I can't add the server to Prisma Cloud. Anyone have some insight on this?Gorodov Maksim
06/27/2018, 3:56 AM[ { side: 'left' }, { side: 'left' } ]
here - https://gist.github.com/SilencerWeb/9384ffc2ef12cd3fdf718f1834808493#file-index-js-L46 instead of something like [ { person: 'cjiwj0g5kztyu0a277xe3tt2j', side: 'left' }, { person: 'cjiwj0g5kztyu0a277xe3tt2j', side: 'left' } ]
.
Strange part is that these created `ActionMember`s are saved in the database correctly - [ { person: 'cjiwj0g5kztyu0a277xe3tt2j', side: 'left' }, { person: 'cjiwj0g5kztyu0a277xe3tt2j', side: 'left' } ]
, but I get another result in my console.log
.
What can be the reason of such behavior?Gorodov Maksim
06/27/2018, 3:58 AMpicosam
06/27/2018, 9:41 AMmatic
06/27/2018, 9:45 AMpicosam
06/27/2018, 9:48 AMArnab
06/27/2018, 9:49 AMmatic
06/27/2018, 9:49 AMpicosam
06/27/2018, 9:50 AMpicosam
06/27/2018, 9:50 AMpicosam
06/27/2018, 9:50 AMnilan
06/27/2018, 9:57 AMzonofthor
06/27/2018, 10:38 AMselect *
?Jim
06/27/2018, 11:17 AMtype Mutation {
loginOld: User!
}
async loginOld(parent, args, ctx, info) {
const authId = await getUserAuthId(ctx);
const existingUser = await ctx.db.query.user({ where: { authId } }, info);
return existingUser;
},
However what I actually want to do is look for a user in the database and return a string:
type Mutation {
login: LoginFeedback
}
type LoginFeedback {
value: String!
}
async login(parent, args, ctx, info) {
const authId = await getUserAuthId(ctx);
const userExists = await ctx.db.query.user({ where: { authId } }, info);
if (userExists) return {value: "A user exists"}
return {value: "No user exists"}
}
Even If I don’t do anything with userExists, as soon as I query the database I get an error message:
Field 'user' of type 'User' must have a sub selection. (line 2, column 3):\n user(where: $_v0_where)\n ^
I think this is the schema getting upset as Ive said the type is LoginFeedback not Login, but is there not a way to query the Prisma database in mutation?Gorodov Maksim
06/27/2018, 11:39 AMttimm
06/27/2018, 11:45 AMMoritz
06/27/2018, 11:52 AMprisma reset
at the moment. I am resetting one of my endpoints, but the data presist. I double checked that I am resetting the right endpoint. Has anyone experienced similar behavior?Shakti
06/27/2018, 11:57 AMnoahdavis
06/27/2018, 12:23 PMdmce
06/27/2018, 12:39 PMprisma deploy
and a post deploy hook to graphql get-schema
how can i import the whole generated schema into my own (as i have some rest API stuff as well), rather than # import OneThing from "./generated/schema.graphql"
linkdd
06/27/2018, 3:23 PMdatamodel.graphql
that I deployed on Prisma, is there a way to regenerate that file by querying Prisma ? I know that with GraphQL we can introspect the API, but this will give me the schema of the generated API, not the source. It may be possible to infer the source from the generated API but it seems complex. I need this to be able to generate a diff between a datamodel.graphql
I have locally and the actual deployed schema.hez
06/27/2018, 4:39 PMpeter
06/27/2018, 5:29 PMgraphql-yoga
server?Ian
06/27/2018, 6:46 PMtype User{
id: ID! @unique
name: String!
rating: Int! @default(value: "0")
createdAt: DateTime!
updatedAt: DateTime!
listings: [Listing!]! @relation(name: "ListingsByUser" onDelete: CASCADE)
}
type Listing {
id: ID! @unique
title: String!
content: String!
published: Boolean! @default(value: "true")
createdAt: DateTime!
updatedAt: DateTime!
author: User! @relation(name: "ListingsByUser")
}
My seed:
mutation {
user: createUser(
data: {
name: "Ian Jamieson"
rating: 0
listings: {
create: {
title: "Test title"
content: "lorem ipsum"
}
}
}
) {
id
}
}
Listing returns the user ok, but my user listings returns null
{
"data": {
"users": [
{
"id": "cjiw9mopw000407197os3fu9d",
"name": "Ian Jamieson",
"rating": 0,
"listings": null
}
]
}
}
Is there something I'm missing?
Found out it's my resolvers index.js
import * as path from "path";
import { mergeResolvers, fileLoader } from "merge-graphql-schemas";
const resolversArray = fileLoader(path.join(__dirname, "./**/*.resolvers.*"));
const resolvers = mergeResolvers(resolversArray);
export default resolvers;
So how do i merge them properly?Stephen
06/27/2018, 8:57 PM