valstu
05/27/2018, 8:58 PMgauthier
05/27/2018, 9:02 PMTSError: ⨯ Unable to compile TypeScript
src/index.ts (62,34): Argument of type '{ context: { db: Prisma; }; resolvers: { Query: { user: (parent: any, args: any, context: any, in...' is not assignable to parameter of type 'Props'.
Types of property 'resolvers' are incompatible.
Type '{ Query: { user: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; }; }' is not assignable to type 'IResolvers'.
Property 'Query' is incompatible with index signature.
Type '{ user: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; }' is not assignable to type '(() => any) | IResolverObject | GraphQLScalarType'.
Type '{ user: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; }' is not assignable to type 'GraphQLScalarType'.
Property 'name' is missing in type '{ user: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; }'. (2345)
at getOutput (/Users/gauthierrodaro/Projects/axio/axio/server/node_modules/ts-node/src/index.ts:330:15)
at Object.compile (ts-node/src/index.ts:518:11)
at Module.m._compile (/src/index.ts:403:43)
at Module._extensions..js (module.js:646:10)
at Object.require.extensions.(anonymous function) [as .ts] (/src/index.ts:406:12)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Function.Module.runMain (module.js:676:10)
at Object.<anonymous> (ts-node/src/bin.ts:145:12)
error Command failed with exit code 1.
gauthier
05/27/2018, 9:03 PMDukuo
05/27/2018, 9:22 PMUsulPro
05/27/2018, 10:57 PMgraphcool
service? It looks like they're still reachable even after deleting appropriate File
node from db 🤔 Actually I removed everything from File
, but all images still available... 🙄Sam Jackson
05/28/2018, 12:28 AMtype Post {
id: ID! @unique
text: String!
parent: Post @relation(name: "PostParent", onDelete: SET_NULL)
children: [Post!]! @relation(name: "PostParent", onDelete: CASCADE)
author: User! @relation(name: "UserPosts", onDelete: SET_NULL)
}
If a post is deleted, I want all of its children to be deleted as well. However, I get this error:
There was a loop in the path generated by the onDelete: Cascade directives on your schema when trying to do the delete.
Any thoughts on how to achieve the desired effect?virtualirfan
05/28/2018, 5:57 AMprisma
, I have a Subscription resolver that ends up in it's request object being undefined. Has anyone tried Subscription with auth? More details in thread:valstu
05/28/2018, 7:56 AMprisma deploy
to Prisma Cloud is the Playground publicly available to anyone if they happen to know the url?valstu
05/28/2018, 8:01 AMSaqib
05/28/2018, 8:30 AMcarstenbaumhoegger
05/28/2018, 9:35 AMseed.graphql
file to do so. I’ve defined 3 mutations to add dummy users and named them differently. When executing I’m getting the following error:
ERROR: Must provide operation name if query contains multiple operations
{
"data": null,
"errors": [
{
"message": "Must provide operation name if query contains multiple operations"
}
],
"status": 200
}
The used seed.graphql
works if I copy it into GraphqL Playground. Can the seed file only contain one mutation?
Here’s the `seed.graphql`:
mutation addUserA {
createUser(data: {
email: "<mailto:usera@example.de|usera@example.de>"
password: "$2a$10$hACwQ5/HQI6FhbIISOUVeusy3sKyUDhSq36fF5d/54aAdiygJPFzm"
firstname: "User"
lastname: "A"
}) {
id
}
}
mutation addUserB {
createUser(data: {
email: "<mailto:userb@example.de|userb@example.de>"
password: "$2a$10$hACwQ5/HQI6FhbIISOUVeusy3sKyUDhSq36fF5d/54aAdiygJPFzm"
firstname: "User"
lastname: "B"
}) {
id
}
}
mutation addUserC {
createUser(data: {
email: "<mailto:userc@example.de|userc@example.de>"
password: "$2a$10$hACwQ5/HQI6FhbIISOUVeusy3sKyUDhSq36fF5d/54aAdiygJPFzm"
firstname: "User"
lastname: "C"
}) {
id
}
}
huv1k
05/28/2018, 12:15 PMhalborg
05/28/2018, 12:36 PMgender: GenderEnum! @default(value: "UNKOWN")
gender: GenderEnum! @default(value: UNKOWN)
gender: GenderEnum! @default(value: GenderEnum.UNKOWN)
enum GenderEnum {
MALE
FEMALE
UNKNOWN
}
Moritz
05/28/2018, 12:42 PMTSError: ⨯ Unable to compile TypeScript
src/index.ts (6,34): Argument of type '{ typeDefs: string; resolvers: { Query: { users: (parent: any, args: any, context: any, info: Gra...' is not assignable to parameter of type 'Props'.
Types of property 'resolvers' are incompatible.
Type '{ Query: { users: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; profil...' is not assignable to type 'IResolvers'.
Property 'Query' is incompatible with index signature.
Type '{ users: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; profiles: (pare...' is not assignable to type '(() => any) | IResolverObject | GraphQLScalarType'.
Type '{ users: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; profiles: (pare...' is not assignable to type 'GraphQLScalarType'.
Quite interestingly, this only happens when I run the server locally, not when I deploy to now. Why could this be happening?
This is how some of the resolvers look:
export const Query = {
users: forwardTo("db"),
profiles: forwardTo("db"),
posts: forwardTo("db"),
events: forwardTo("db"),
venues: forwardTo("db"),
artists: forwardTo("db"),
profile(parent, { id }, ctx: Context, info) {
return ctx.db.query.profile({ where: { id } }, info);
},
async me(parent, args, ctx: Context, info) {
const id = await getUserId(ctx);
return ctx.db.query.user({ where: { id } }, info);
},
simz
05/28/2018, 1:08 PMsimz
05/28/2018, 1:31 PMylli
05/28/2018, 1:41 PMylli
05/28/2018, 1:41 PMException in thread "main" java.sql.SQLTransientConnectionException: database - Connection is not available, request timed out after 5000ms.
at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:548)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:186)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:145)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:83)
at slick.jdbc.hikaricp.HikariCPJdbcDataSource.createConnection(HikariCPJdbcDataSource.scala:18)
at slick.jdbc.JdbcBackend$BaseSession.<init>(JdbcBackend.scala:439)
at slick.jdbc.JdbcBackend$DatabaseDef.createSession(JdbcBackend.scala:47)
at slick.jdbc.JdbcBackend$DatabaseDef.createSession(JdbcBackend.scala:38)
at slick.basic.BasicBackend$DatabaseDef.acquireSession(BasicBackend.scala:218)
at slick.basic.BasicBackend$DatabaseDef.acquireSession$(BasicBackend.scala:217)
at slick.jdbc.JdbcBackend$DatabaseDef.acquireSession(JdbcBackend.scala:38)
at slick.basic.BasicBackend$DatabaseDef$$anon$2.run(BasicBackend.scala:239)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.postgresql.util.PSQLException: Transaction isolation level -1 not supported.
at org.postgresql.jdbc.PgConnection.setTransactionIsolation(PgConnection.java:833)
at com.zaxxer.hikari.pool.PoolBase.setupConnection(PoolBase.java:378)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:346)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:193)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:430)
at com.zaxxer.hikari.pool.HikariPool.access$500(HikariPool.java:64)
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:570)
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:563)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
ylli
05/28/2018, 1:42 PMJeff
05/28/2018, 4:00 PMSam Jackson
05/28/2018, 6:01 PMvirtualirfan
05/28/2018, 10:14 PMRelay
called clientMutationId
. Anyone know the fate of that? Is there an equivalent construct in Prisma
?chasm
05/28/2018, 10:23 PMPlínio Naves
05/28/2018, 11:38 PMryanmagoon
05/29/2018, 12:28 AMryanmagoon
05/29/2018, 12:28 AMryanmagoon
05/29/2018, 12:29 AMgraphql-yoga
setup with prisma similar to what they’re doing with the howtographql.com tutorialschasm
05/29/2018, 12:47 AMvirtualirfan
05/29/2018, 3:08 AMRelay
ones are out of date with the actual changes in the Prisma API.siyfion
05/29/2018, 9:48 AMprisma deploy
to read my .envrc
file as opposed to a .env
file?