John O'Sullivan
11/16/2018, 8:39 PMJohn O'Sullivan
11/16/2018, 8:59 PMexp
and nbf
, which correspond to the expiration time in seconds and the current time ("not before") in seconds.rwatts3
11/16/2018, 10:03 PMrwatts3
11/16/2018, 10:04 PMtsdexter
11/16/2018, 10:06 PMprisma-client
(yoga server) that apollo-client
connects to depending on the subdomain, each yoga server is a separate running instantiation of the same yoga
codebase but points to a different prisma-service
on the one prisma-server
(is there a way to have one yoga server point to different endpoints like graphcool used to do via /api/serviceId
?)… The public
app engine service uses nginx
and s6
to manage running the front end app and many yoga servers on the same app engine… This diagram doesn’t even include the google cloud functions used for subscriptions or the google cloud storage used for the File API - what is the simpler way?
I’m a front end developer, hence why I chose graph.cool originally… I’m totally open to suggestions for a proper, more scalable set up… most of the tutorials tell you how to get your prisma and yoga servers up but then leave it at that and don’t explain dealing with multiple endpoints, multiple apps, etc..vdiaz1130
11/16/2018, 11:46 PMkyle.james
11/17/2018, 12:12 AMkyle.james
11/17/2018, 12:13 AMtsdexter
11/17/2018, 12:52 AMRole
requires a list of [User!]!
and a single `Customer`… When I signup a user I want to create the new Customer
, it’s first User
and an admin Role
for that Customer
and User
- how would I do this?
const user = await ctx.db.createUser({
firstname: firstname || undefined,
lastname: lastname || undefined,
email,
password: hashedPassword,
emailConfirmToken,
emailConfirmed: false,
inviteAccepted: true,
customer: {
create: {
name: customerName
}
},
role: {
create: {
name: "Admin",
permissions: {
connect: {
allow: "SUDO"
}
}
}
}
});
this creates the role on the user, but I also want the Role
to be associated to the Customer
created above it…? Do I have to create the Role
in a separate request and then just connect it in the customer
and role
fields?hinsxd
11/17/2018, 9:58 AMprisma.request
(or $request
) and mutation {
executeRaw(
query: "..."
)
}
?Dennis
11/17/2018, 9:58 AMhinsxd
11/17/2018, 10:37 AMrequest
or $request
exposed in prisma client. Any clue?hinsxd
11/17/2018, 10:54 AMprisma.$graphql
, yet there are some problems in reading query string.hinsxd
11/17/2018, 11:01 AMawait prisma.$graphql(`
mutation {
executeRaw(query: "SELECT * FROM default$default.\\"User\\" LIMIT 10")
}
`)
I must not add /* GraphQL */
in front of the query string, otherwise prettier will eliminate the double backslashes, because the prisma server needs a single backslash to identify quotes inside executeRaw
hinsxd
11/17/2018, 11:02 AMhinsxd
11/17/2018, 11:09 AMcontains
to do what I want!
Just for you guys’ reference if anyone is trying something like me.Alex
11/17/2018, 3:40 PMbjulia
11/17/2018, 5:12 PMmichal.tomsia
11/17/2018, 5:41 PMVariable '$data' cannot be non input type
but did someone find out what's going on and how to fix it? I see the error when running the following mutation:
return ctx.prisma.updateManyProductVariants({
where: { product: { id: productId } },
data: { deletedAt: new Date().toISOString() }
});
It's working fine in playground e.g.
mutation {
updateManyProductVariants(where:{
product:{
id:"cjolpj9ez01zq0a926dvb0v2t"
}
}, data: {
deletedAt: "2018-11-17T17:20:13.998Z",
}) {
count
}
}
cfree
11/17/2018, 6:09 PMtype Query {
candidates(role: Role!, accountStatus: AccountStatus!): [User]!
}
type User {
id: ID!
firstName: String!
lastName: String!
roles: [Role!]!
accountStatus: AccountStatus!
}
My resolver:
candidates(parent, args, ctx, info) {
return ctx.db.query.users({
where: {
role: args.role,
accountStatus: args.accountStatus,
},
}, info);
},
My query:
query CANDIDATES_QUERY {
candidates(role: FULL_MEMBER, accountStatus: ACTIVE) {
id
firstName
lastName
}
}
vdiaz1130
11/17/2018, 7:24 PMgraphqlgen
with prisma do we still run prisma generate
?vdiaz1130
11/17/2018, 8:09 PMType 'import(".../src/generated/graphqlgen").MutationResolvers.UserUpdateInput' is not assignable to
Type 'import(".../src/generated/prisma-client/index").UserUpdateInput'.
Types of property 'name' are incompatible.
Type 'string | null' is not assignable to type 'string | undefined'.
Type 'null' is not assignable to type 'string | undefined'. [2322]
Any ideas?vdiaz1130
11/17/2018, 8:31 PMvdiaz1130
11/17/2018, 8:31 PMAndres Montoya
11/17/2018, 10:32 PMRamin B
11/18/2018, 12:04 AMjess
11/18/2018, 6:07 AMRaeesaa
11/18/2018, 8:12 AMexecuteRaw
mutations support transactions?BaniNaveen
11/18/2018, 11:56 AMsamba
11/18/2018, 5:58 PMTSError: ⨯ Unable to compile TypeScript:
generated/prisma-client/index.ts(348,72): error TS2345: Argument of type '{ typeDefs: string; endpoint: string; }' is not assignable to parameter of type '{ typeDefs: string; endpoint: string; secret?: string; models: Model[]; }'.
Property 'models' is missing in type '{ typeDefs: string; endpoint: string; }'.