martin
11/04/2020, 4:04 AMFacilitator
and User
fields are relations.martin
11/04/2020, 4:04 AMBex
11/04/2020, 6:11 AMLucas
11/04/2020, 7:22 AMnexus/schema
and nexus-plugin-prismic
to create the schema an then use it into apollo-server
or graphql-yoga
.
My question is if there is any way to automatically build NexusSchema.makeSchema
?
Or maybe i am confused and the way to go is to pass the nexus-prismic-plugin
as a plugin options to makeSchema
and this should be enough?
Thanks in advance!Gabriel Oliveira
11/04/2020, 12:21 PMCannot return null for non-nullable field User.id.
This is happening when trying to fetch data from a model called Consultation
which has a field called requestedBy
which is a relation to a model User
, so one Consultation
has a 1-to-1
relation with User
model
I know the data exist in this nested query, because I'm migrating from prisma1 to prisma2, and in the prisma1 project the result comes in correctly
simplified Models:
model User {
id String @id @default(cuid())
name String
Consultation_Consultation_requestedByToUser Consultation[] @relation("Consultation_requestedByToUser")
}
model Consultation {
id String @id @default(cuid())
details String?
requestedBy String?
User_Consultation_requestedByToUser User? @relation("Consultation_requestedByToUser", fields: [requestedBy], references: [id])
}
Query Resolver:
return ctx.prisma.consultation.findMany({
include: {
User_Consultation_requestedByToUser: true,
},
})
So my general question is, when you face this kind of error, would it be because something is wrong in the resolver query only, or should I also review if something is wrong in my models relation designNatalia
Malik
11/04/2020, 6:29 PMMalik
11/04/2020, 6:29 PMAdam
11/04/2020, 7:18 PMMalik
11/04/2020, 7:24 PMPieter
11/04/2020, 7:32 PMJustin Ellingwood
11/05/2020, 4:10 PMDeniz Aybars
11/05/2020, 5:26 PMNatalia
Ahmet
11/05/2020, 9:03 PMAlexis Gonzalez
11/06/2020, 8:18 AMAlexis Gonzalez
11/06/2020, 8:18 AM"message":"Task slick.basic.BasicBackend$DatabaseDef$$anon$3@67704cfc rejected from slick.util.AsyncExecutor$$anon$1$$anon$2@355c4e9e[Running, pool size = 9, active threads = 9, queued tasks = 1000, completed tasks = 508840]"
Jose Maria CL
11/06/2020, 6:36 PMJohn Cantrell
11/06/2020, 7:24 PMMaher Aldous
11/07/2020, 4:30 AMMark Jackson
11/07/2020, 4:44 AMWindward Hive
11/07/2020, 4:14 PMAhmet
11/07/2020, 10:41 PMtype Project {
id: UUID! @id
locationSecurity: Json
}
PostgreSQL type:
locationSecurity | text | | | | extended | |
It is stored in schema as JSON and in the database as text. Why? This is bug? Or is there a specific reason?Manthan Mallikarjun
11/09/2020, 9:11 AM@createdAt
just like @updatedAt
? It could literally map to @default(now())
but it would make the schema feel more consistentKJReactor
11/09/2020, 4:12 PMAmit
11/09/2020, 7:34 PMAaron Fulkerson
11/10/2020, 2:40 AMstephan
11/10/2020, 9:20 AMpedeceul
11/10/2020, 1:21 PM["java.sql.SQLNonTransientConnectionException: (conn=10954) Connection timed out\n\tat org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:161)\n\tat org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:106)\n\tat org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:235)\n\tat org.mariadb.jdbc.MariaDbPreparedStatementClient.executeInternal(MariaDbPreparedStatementClient.java:224)\n\tat org.mariadb.jdbc.MariaDbPreparedStatementClient.execute(MariaDbPreparedStatementClient.java:159)\n\tat com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)\n\tat com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)\n\tat slick.jdbc.StatementInvoker.results(StatementInvoker.scala:39)\n\tat slick.jdbc.StatementInvoker.iteratorTo(StatementInvoker.scala:22)\n\tat slick.jdbc.Invoker.first(Invoker.scala:30)\n\tat slick.jdbc.Invoker.first$(Invoker.scala:29)\n\tat slick.jdbc.StatementInvoker.first(StatementInvoker.scala:16)\n\tat slick.jdbc.StreamingInvokerAction$HeadAction.run(StreamingInvokerAction.scala:52)\n\tat slick.jdbc.StreamingInvokerAction$HeadAction.run(StreamingInvokerAction.scala:51)\n\tat slick.basic.BasicBackend$DatabaseDef$anon$3.liftedTree1$1(BasicBackend.scala:276)\n\tat slick.basic.BasicBackend$DatabaseDef$anon$3.run(BasicBackend.scala:276)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\nCaused by: java.sql.SQLException: Connection timed out\n\tat org.mariadb.jdbc.internal.util.LogQueryTool.exceptionWithQuery(LogQueryTool.java:142)\n\tat org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:217)\n\tat org.mariadb.jdbc.MariaDbPreparedStatementClient.executeInternal(MariaDbPreparedStatementClient.java:218)\n\t... 15 more\nCaused by: java.sql.SQLException: Could not send query: Read timed out\n\tat org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.handleIoException(AbstractQueryProtocol.java:1738)\n\tat org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1302)\n\tat org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1281)\n\tat org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:214)\n\t... 16 more\nCaused by: <http://java.net|java.net>.SocketTimeoutException: Read timed out\n\tat <http://java.net|java.net>.SocketInputStream.socketRead0(Native Method)\n\tat <http://java.net|java.net>.SocketInputStream.socketRead(SocketInputStream.java:116)\n\tat java.net.SocketInputStream.read(SocketInputStream.java:171)\n\tat java.net.SocketInputStream.read(SocketInputStream.java:141)\n\tat <http://java.io|java.io>.BufferedInputStream.fill(BufferedInputStream.java:246)\n\tat <http://java.io|java.io>.BufferedInputStream.read1(BufferedInputStream.java:286)\n\tat java.io.BufferedInputStream.read(BufferedInputStream.java:345)\n\tat <http://org.mariadb.jdbc.internal.io|org.mariadb.jdbc.internal.io>.input.StandardPacketInputStream.getPacketArray(StandardPacketInputStream.java:238)\n\tat <http://org.mariadb.jdbc.internal.io|org.mariadb.jdbc.internal.io>.input.StandardPacketInputStream.getPacket(StandardPacketInputStream.java:208)\n\tat org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1300)\n\t... 18 more\n"]
I tried to increase some mysql parameter to increase the timeout: wait_timeout, max_execution_time, but the error is the same. Did someone encountered this or has a clue about how to solve it? ThanksSamrith Shankar
11/10/2020, 8:52 PM