Montana Flynn
06/17/2019, 5:58 AMjjaybrown98
06/17/2019, 7:07 AMpatrick
06/17/2019, 12:11 PMvjsingh
06/17/2019, 3:11 PMAkshay Dhiman
06/17/2019, 7:36 PMvjsingh
06/17/2019, 9:05 PMBill Pliske
06/18/2019, 3:00 AMBruno Prela
06/18/2019, 3:29 AMBill Pliske
06/18/2019, 4:11 AMMorten Bo Rønsholdt
06/18/2019, 10:53 AMquery Stores {
searchLocalBusinesses(
where: { aroundGeolocation: "u3buwmf", aroundRadius: 7000 }
) {
nodes {
id
vampireSquidId
name
streetAddress
postalCode
city
longitude
latitude
externalId
business {
countryCode
name
vampireSquidId
positiveLogotype {
url(width: 160, height: 45)
}
negativeLogotype {
url(width: 160, height: 45)
}
primaryColor
websiteLink
shortDescription
}
}
}
}
when load testing this with wrk I get these results:
└─ $ ▶ LT_DURATION=30s LT_CONNS=30 LT_THREADS=4 wrk -t4 -d30s -c30 '--latency' --script local-business-search.lua --timeout 2s "<http://localhost:4000/v3>"
Running 30s test @ <http://localhost:4000/v3>
4 threads and 30 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.25s 220.43ms 1.83s 65.55%
Req/Sec 7.54 5.67 30.00 82.91%
Latency Distribution
50% 1.24s
75% 1.41s
90% 1.56s
99% 1.76s
659 requests in 30.09s, 16.30MB read
Requests/sec: 21.90
Transfer/sec: 554.58KB
in other words, very low throughput and slow response times. and it's all due to business
, business.positiveLogotype
and business.negativeLogotype
. I thought Prisma was going to be fast using data pooling but my tests don't reflect that. are there any tricks to this?
my resolver look like this:
module.exports = async (root, args, ctx) => {
const t = Date.now();
const result = await searchLocalBusiness(args);
console.log('es search', Date.now() - t);
const tt = Date.now();
const nodes = await ctx.prisma.localBusinesses({where: {id_in: result.ids}});
console.log('hydrate', Date.now() - tt);
return {
total: result.total,
took: result.took,
nodes: nodes,
pageInfo: pageInfo(args, result.total, nodes.length, 10000)
};
};
it's basically the opposite of what https://www.prisma.io/features/query-engine is saying. hydrate
is taking all the time and it becomes slower and slower where elasticsearch is consistently fast. ES takes around 30ms and hydrate 400msevondev
06/18/2019, 1:38 PMtafelito
06/18/2019, 4:46 PMtype User {
id: ID! @id
posts: [Post!]!
}
type Post {
id: ID! @id
user: User! @relation(link: TABLE, name: "MyRelation")
}
type MyRelation @relationTable {
user: User!
post: Post!
}
but when I try to deploy, I get this
You are trying to set the relation 'MyRelation' from `Post` to `User` and are only providing a relation directive with a name on `Post`. Please also provide the same named relation directive on the relation field on `User` pointing towards `Post`.
why is that?
I’m using mySQLtafelito
06/18/2019, 4:48 PMPeter Rogov
06/18/2019, 5:16 PMmichaelchiche
06/18/2019, 5:42 PMJared
06/18/2019, 6:45 PMArmaan Dhanji
06/18/2019, 8:26 PMNeme Sáenz
06/18/2019, 9:15 PMTanjim Hossain
06/18/2019, 9:29 PMAlex Budure
06/18/2019, 10:37 PMBrice Lechatellier
06/19/2019, 12:26 AMprisma deploy
using an introspected Postgres schema, similar to this issue https://github.com/prisma/prisma/issues/4473
com.prisma.shared.models.TypeIdentifier$Relation$ cannot be cast to com.prisma.shared.models.TypeIdentifier$ScalarTypeIdentifier
Do you know how I go about debugging please?Devion Villegas
06/19/2019, 5:36 AMUby
06/19/2019, 8:00 AMmedv
06/19/2019, 9:43 AMOsicka
06/19/2019, 11:48 AMconst server = new GraphQLServer({
typeDefs: './schema.graphql',
resolvers,
context: request => ({
...request,
}),
})
server.express.get('/heartbeat', (req, res) => res.send({"up":true}))
server.start({
port: 8080
}, () => console.log('Server is running')
)
Why isn’t it picked up?Steve Meyer
06/19/2019, 12:08 PMrein
06/19/2019, 1:27 PMyolen
06/19/2019, 1:57 PMpatrick
06/19/2019, 2:01 PMimpowski
06/19/2019, 2:08 PMprisma2 convert
doesn’t work yet?