agustif
06/25/2018, 6:46 PMagustif
06/25/2018, 6:46 PMagustif
06/25/2018, 6:48 PMjay.araujo
06/25/2018, 7:41 PMjay.araujo
06/25/2018, 7:41 PMrwatts3
06/25/2018, 7:54 PMVinnie
06/25/2018, 8:04 PMVinnie
06/25/2018, 8:05 PMVinnie
06/25/2018, 8:05 PMUser
✖ You are creating a required field but there are already nodes present that would violate that constraint.
jay.araujo
06/25/2018, 8:36 PMjay.araujo
06/25/2018, 8:36 PMjay.araujo
06/25/2018, 8:37 PMpettanko
06/25/2018, 8:44 PManton-b
06/25/2018, 10:59 PMrefreshTokenFn()
work here other than making sure that the token has not expired: https://github.com/graphql-boilerplates/react-fullstack-graphql/blob/23e47d49640384121550cef044551680734af143/advanced/src/components/RootContainer.js#L41Devin
06/26/2018, 12:20 AMtype Account {
id: ID! @unique
createdAt: DateTime!
updatedAt: DateTime!
archivedAt: DateTime
owner: User!
vessels: [Vessel!]!
name: String!
users: [User!]!
}
type User {
id: ID! @unique
createdAt: DateTime!
updatedAt: DateTime!
archivedAt: DateTime
email: String! @unique
password: String!
name: String!
posts: [Post!]!
role: Role! @default(value: "CUSTOMER")
customerType: CustomerType! @default(value: "FREE")
account: Account
}
Do I really need to use relations on both the account and user type?iamclaytonray
06/26/2018, 1:14 AMprisma
(the dep) seems to be breaking npm installs. Anyone have this issue and want to give me some much needed advice? 🙂Gorodov Maksim
06/26/2018, 4:35 AMtype Action {
id: ID! @unique
title: String!
date: String!
description: String!
karma: String!
executors: String!
members: [ActionMember!]!
author: User!
}
type ActionMember {
person: Person!
side: String!
}
now I have such code but it doesn't work:
createAction: (_, args, context, info) => {
return context.prisma.mutation.createAction(
{
data: {
title: args.title,
date: args.date,
description: args.description,
karma: args.karma,
executors: args.executors,
members: args.members.map((member) => {
return {
person: {
connect: {
id: member.personId,
},
},
side: member.side,
};
}),
author: {
connect: {
id: args.authorId,
},
},
},
},
info,
);
},
I have such error: Field "1" is not defined by type ActionMemberCreateManyInput at value.members.
qsys
06/26/2018, 8:28 AMnull
or an empty array... How can I do that?
{"OR" [{"attribute...?": ...?}]}
how do I filter properly?CHaBou
06/26/2018, 10:29 AMsequelize
as ORM directly plugged to Prisma db). But I have some difficulties, especially to create an entity (and generate an ID). I suppose that we are not supposed to directly access/modify Prisma db?user
06/26/2018, 10:36 AMJim
06/26/2018, 10:55 AMfunction myMiddle(req, res, next) {
next()
}
const server = new GraphQLServer({
typeDefs: './src/schema.graphql',
resolvers,
middlewares: [myMiddle],
context: req => ({
...req,
db: new Prisma({
typeDefs: 'src/generated/prisma.graphql', // the auto-generated GraphQL schema of the Prisma API
endpoint: process.env.PRISMA_ENDPOINT, // the endpoint of the Prisma API (value set in `.env`)
debug: true, // log all GraphQL queries & mutations sent to the Prisma API
// secret: process.env.PRISMA_SECRET, // only needed if specified in `database/prisma.yml` (value set in `.env`)
}),
}),
});
server.start(() => console.log('Server is running on <http://localhost:4000'>));
tomhut
06/26/2018, 12:26 PMtomhut
06/26/2018, 12:28 PMalloy
06/26/2018, 12:42 PMgql
tags being recognized, which would seem to indicate that it doesn’t? However, even if I change graphql
tags in my .tsx
file to gql
tags the extension doesn’t seem to be giving me any intellisenseblackxored
06/26/2018, 12:56 PMpettanko
06/26/2018, 1:31 PMError! Network error: Error writing result to store for query: query me { me { received { id from { id name avatar __typename } __typename } __typename } } Store error: the application attempted to write an object with no provided id but the store already contains an id of User:cjifvqd5i000o0728qrffx3y1 for this object. The selectionSet that was trying to be written is: me { received { id from { id name avatar __typename } __typename } __typename }
siyfion
06/26/2018, 1:36 PMsiyfion
06/26/2018, 2:01 PMsiyfion
06/26/2018, 2:01 PM