halborg
06/20/2018, 8:15 AMinfo
object in our resolvers? We can’t pass it on unmodified, as the AST would not match the DB schema.
I can’t find any examples or documentation about it, and it seems to me to be a main component of Prisma that the app schema and DB schema are separated and can evolve separately, so there must be some better way than to do string manipulation, right?Darryl
06/20/2018, 8:59 AMtype Book @model {
id: ID! @unique
name: String!
versions: [Version!]!
}
type Version {
name: String!
publishDate: String!
}
Darryl
06/20/2018, 8:59 AMDarryl
06/20/2018, 9:01 AMmutation CreateBook {
createBook(data: {
name: "Some book"
versions: [
{ name: "..." publishDate: "..." }
{ name: "..." publishDate: "..." }
]
}) {
id
}
}
Moritz
06/20/2018, 9:08 AMDarryl
06/20/2018, 9:32 AMMoritz
06/20/2018, 9:44 AMmop
06/20/2018, 10:52 AMmop
06/20/2018, 10:53 AMlewisblackwood
06/20/2018, 11:07 AMprisma seed
CLI command for a particular Prisma service? It's helpful for our local development service, but I don't want it to be enabled for our staging/production services.eelke
06/20/2018, 1:31 PMfoos: [Foo!]!
bars: [Bar]
and not like this:
foos: [Foo]!
bars: [Bar]!
(I like the latter because then I know it'll always be an array which I can then map
over)eelke
06/20/2018, 1:31 PMNote that a to-many relation field is always set to required. For example, a field that contains many user addresses always uses the type [Address!]! and can never be of type [Address!]. The reason is that in case the field doesn't contain any nodes, [] will be returned, which is not null.
eelke
06/20/2018, 1:32 PMtheom
06/20/2018, 2:19 PMsiyfion
06/20/2018, 2:50 PMUser
type with a many-to-many relationship defined with a Tag
type. The createUser
and updateUser
allow us to specify tags: { connection: [ { id: "..." }, { id: "..." } ] }
which will create a relationship between the user and the specified tags (via id
). However, when we use upsertUser
and do the same, it runs successfully but NONE of the connections/relationships are created.siyfion
06/20/2018, 2:52 PMpeter
06/20/2018, 3:08 PMgraphql-import
, is there an extra cost to importing all types (import * from "./generated/prisma.graphql"
) vs selectively importing specific types?johhansantana
06/20/2018, 4:17 PMArnab
06/20/2018, 4:40 PMprisma=# \d
Did not find any relations.
I have set up the following types and inserted one object of type `Speaker`:
type Speaker {
id: ID! @unique
firstname: String!
lastname: String!
email: String
}
type Talk {
id: ID! @unique
speaker: Speaker!
description: String
title: String
}
Arnab
06/20/2018, 5:15 PMmysql> show tables;
+-------------------+
| Tables_in_prisma |
+-------------------+
| InternalMigration |
| Migration |
| Project |
| TelemetryInfo |
+-------------------+
4 rows in set (0.00 sec)
jaybauer
06/20/2018, 5:58 PMprisma cluster logs
and nothing shows up, it just says Attaching to
and then stops without an error. This is only happening for one specific mutation, most work fine. I’ve tried nuking my cluster after I saw some people were having a similar issue a few months ago, but to no avail. I’m running prisma v1.7ryannealmes
06/20/2018, 7:26 PMconst fetch = require('node-fetch')
const { makeRemoteExecutableSchema, introspectSchema } = require('graphql-tools')
const { GraphQLServer } = require('graphql-yoga')
const { createHttpLink } = require('apollo-link-http')
const { DATABASE_SERVICE_ID } = require('./services')
async function run() {
// 1. Create Apollo Link that's connected to the underlying GraphQL API
const makeDatabaseServiceLink = () => createHttpLink({
uri: `<https://api.graph.cool/simple/v1/${DATABASE_SERVICE_ID}>`,
fetch
})
// 2. Retrieve schema definition of the underlying GraphQL API
const databaseServiceSchemaDefinition = await introspectSchema(makeDatabaseServiceLink())
// 3. Create the executable schema based on schema definition and Apollo Link
const databaseServiceExecutableSchema = makeRemoteExecutableSchema({
schema: databaseServiceSchemaDefinition,
link: makeDatabaseServiceLink()
})
// 4. Create and start proxy server based on the executable schema
const server = new GraphQLServer({ schema: databaseServiceExecutableSchema })
server.start(() => console.log('Server is running on <http://localhost:4000'>))
}
run()
But it doesn’t seem like the context is passed to the external service. Any ideas? I have read the apollo docs, and I sort of get it, but I can’t figure it outKlaus Breyer
06/20/2018, 7:53 PMryannealmes
06/20/2018, 11:33 PMmikedklein
06/21/2018, 12:28 AMnick
06/21/2018, 4:29 AMsweekar
06/21/2018, 6:46 AMChristian
06/21/2018, 8:10 AMWhoops. Looks like an internal server error.
on eu4
, anyone else having problems?zonofthor
06/21/2018, 9:26 AMisVisible: !isVisible
sweekar
06/21/2018, 9:54 AM