qsys
06/13/2018, 2:20 PMbookingId
...Alex Howard
06/13/2018, 8:28 PMtype User {
id: ID!
oid: String!
role: Role!
roleName: String!
}
and this code:
const attachRoleName = user => ({
...user,
roleName: user.role.name,
});
const Query = {
...
async currentUser(parent, args, context, info) {
const { request } = context;
const user = await context.db.query.user({ where: { oid: request.user.oid } }, info);
return attachRoleName(user);
},
...
};
I can't seem to request roleName
from the clientside without requesting role { name }
as well–which makes sense since I'm just passing info
straight through–so how would I add the equiv of role { name }
to info if I detect that they are requesting roleName
?Alex Howard
06/13/2018, 8:29 PMinfo
is of the GraphQLResolveInfo typealechp
06/14/2018, 3:18 PMtimm
06/14/2018, 7:44 PMmedelman
06/15/2018, 8:56 PMericsonluciano
06/16/2018, 2:17 PMcsilvacaio
06/20/2018, 4:02 PMand's
and or's
of the request?
Trying to clarify a little bit, e.g.:
(
name = 'Caio'
OR
name = 'Felipe'
)
AND
(
age = '25'
OR
age = '30'
)
Lucas Geitner
06/21/2018, 5:27 PMDukuo
06/22/2018, 5:54 AMericsonluciano
06/22/2018, 2:50 PMprisma init
and set the cluster endpoint to digitalocean i already setup the digital ocean but look's like i can't create a projectMChorfa
06/23/2018, 1:36 AMDukuo
06/23/2018, 5:39 AMjake
06/29/2018, 7:11 PMjake
06/29/2018, 7:11 PMjake
06/29/2018, 7:12 PMJenkins
06/29/2018, 7:21 PMawait
the response from the database, modify your stuff and then return?jake
06/29/2018, 7:30 PMLineItem: {
id: root => root._id || root.id,
product: async ({ Product_SKU__c }) => {
let Product = await sf.sobject('Product2').retrieve(Product_SKU__c);
return Object.assign({ id: Product_SKU__c }, SerializeRecord(Product));
}
},
jake
06/29/2018, 7:49 PMjake
06/29/2018, 7:50 PMJenkins
06/29/2018, 8:07 PMjake
06/30/2018, 2:02 PMmiho
07/02/2018, 12:41 PMweakky
07/03/2018, 10:18 AMgantman
07/03/2018, 1:34 PMdreadjr
07/03/2018, 9:41 PMhvillain
07/06/2018, 11:56 AMplayra
07/09/2018, 7:33 PMasync createDraft(parent, { title, text }, ctx, info) {
const userId = getUserId(ctx)
return ctx.db.mutation.createPost(
{
data: {
title,
text,
isPublished: false,
author: {
connect: { id: userId },
},
},
},
info
)
},
Haider Malik
07/11/2018, 11:49 AMMessage: Your token is invalid. It might have expired or you mightbe using a token from a different project., Location: undefined, Path: undefined [Network error]: Error: Your token is invalid. It might have expired or you might be using a token from a different project.
Prisma.yaml
endpoint: <https://eu1.prisma.sh/haider-malik-c1556sddd/had/dev>
datamodel: datamodel.graphql
secret: mysecret33
hooks:
post-deploy:
- graphql get-schema --project database
.graphqlconfig.yml
projects:
app:
schemaPath: src/schema.graphql
extensions:
endpoints:
default: <http://localhost:4000>
database:
schemaPath: src/generated/prisma.graphql
extensions:
prisma: database/prisma.yml
Arnab
07/11/2018, 1:10 PMreset_db
script (that basically wipes all data and reinitializes the DB), then I was able to log in again.