Jo Sprague
07/03/2018, 6:38 PMJo Sprague
07/03/2018, 6:45 PMyuri
07/03/2018, 7:39 PMGraphQL error: Either that heroku account doesn't exist or it's not part of this workspace
hez
07/03/2018, 7:45 PMstartTime
and an endTime
Using prisma-connect, how would I go about writing a query that accepts a DateTime
string, and returns the proper object on which this input falls between the startTime
and endTime
Likewise, when adding new objects to this table, how could I structure a mutation to ensure that no time boundaries overlap?checkmatez
07/03/2018, 8:01 PMJonathan
07/03/2018, 8:02 PMJonathan
07/03/2018, 8:03 PMJenkins
07/03/2018, 8:14 PMJonathan
07/03/2018, 8:17 PMJonathan
07/03/2018, 8:37 PMJenkins
07/03/2018, 8:38 PMdreadjr
07/03/2018, 9:42 PMKevinclap
07/04/2018, 1:25 AMbuoyantair
07/04/2018, 6:55 AMGorodov Maksim
07/04/2018, 8:43 AMtype Person {
id: ID! @unique
name: String!
position: String!
karma: Int!
description: String
actions: [Action!]!
author: User!
}
type Action {
id: ID! @unique
title: String!
date: String!
description: String
karma: String!
executors: String!
members: [ActionMember!]!
author: User!
}
type ActionMember {
id: ID! @unique
person: Person
user: User
isUser: Boolean!
side: String!
}
And I need to connect Action
to Person
via ActionMember
. Is it possible? If yes, could u tell me how?
This schema on gist (better highlight, slack sucks in it) - https://gist.github.com/SilencerWeb/c6028759e62ef83bfefe3d8261796a89Gorodov Maksim
07/04/2018, 8:45 AMAction
can be connected to many `Person`smichael.graham
07/04/2018, 8:53 AMbhargav
07/04/2018, 9:02 AMb4dnewz
07/04/2018, 10:56 AMyordi-twinski
07/04/2018, 11:22 AMLucas Geitner
07/04/2018, 11:56 AMNick
07/04/2018, 12:00 PMArnab
07/04/2018, 12:15 PMError: The provided database doesn't contain any tables. Please either provide another database or choose "No" for "Does your database contain existing data?"
.
However, when I do psql -h localhost -p 5430 -U <my_user> -p <my_password
and then \dt
I can see lots of tables in my schema.
Does it matter that the database in question has a few triggers and also is a bitemporal database?Darryl
07/04/2018, 12:31 PMfreder
07/04/2018, 12:58 PMprisma
project locally (using docker). now I want to implement custom resolvers, but I'm not sure how to register them. the documentation always seems to assume that I'm using graphql-yoga
directly... what am I missing here?Darryl
07/04/2018, 1:38 PM// args.ingredients = [ { quantity: 1, ingredient: 'Ingredient 1' }, { quantity: 3, ingredient: 'Ingredient 2' } ]
// args.categories = ["Category 1", "Category 2"]
return context.prisma.mutation.createRecipe(
{
data: {
name,
ingredients: { ... } ← how should this look?
categories: {
connect: [...args.categories]
}
}
},
info
);
I essentially want the written ingredients (on the recipe) to be:
ingredients: [
{
ingredient: { ... } ← this is the connected ingredient from the ingredients table so it'll have all its nested info
quantity: 1 ← this is the quantity specified for that specific ingredient
},
{
ingredient: { ... }
quantity: 3
}
]
As you can see in the mutation, I’m using connect with categories and I get that spreading them will connect to all categories but I don’t understand how to do this with ingredients as I’m not just connecting to the ingredients provided; I’m also wanting to keep the quantity provided.Darryl
07/04/2018, 1:44 PMingredients: {
create: [
{
quantity: ??? ← what do I put here? There are multiple ingredients so multiple values for quantity
ingredient: {
connect: ??? ← what do I put here? There are multiple ingredients and each one connects to a specific ingredient in the db
}
}
]
}
yuri
07/04/2018, 4:03 PMGraphQL error: Either that heroku account doesn't exist or it's not part of this workspace
aroman
07/04/2018, 4:37 PMnilan
07/04/2018, 4:38 PM