Jemin Kothari
07/26/2021, 10:13 AMpreviewFeatures = ["orderByRelation"]
to support sorting with the relation model.
And it is working fine with prisma client. But in my project I used nexus and pal js with prisma and created graphql endpoint.
So how can I implement orderByRelation
with nexus graphql. Is there any docs?Ahmed
07/26/2021, 11:26 AMpal g
after adding the preview feature and pal will regenerate your inputs to accept relation in the order by fieldJemin Kothari
07/26/2021, 11:28 AMJemin Kothari
07/26/2021, 12:03 PMgenerator client {
provider = "prisma-client-js"
previewFeatures = ["selectRelationCount", "filterJson", "referentialActions", "orderByRelation"]
}
And run yarn pal g
Here is my pal.js file
module.exports = {
backend: {
generator: 'nexus',
output: 'apps/bridge-api/src/generated/types',
}
}
Jemin Kothari
07/26/2021, 12:03 PMJemin Kothari
07/26/2021, 12:05 PMJemin Kothari
07/26/2021, 12:12 PMAhmed
07/26/2021, 12:13 PMJemin Kothari
07/26/2021, 12:14 PMAhmed
07/26/2021, 12:30 PMyarn generate
if you using any paljs templates
or run prisma generate
then start your server and refresh your graphql pageJemin Kothari
07/26/2021, 12:32 PMJemin Kothari
07/26/2021, 12:33 PMJemin Kothari
07/26/2021, 12:35 PMnexus
generatorJemin Kothari
07/26/2021, 12:35 PMAhmed
07/26/2021, 12:35 PMAhmed
07/26/2021, 12:36 PMJemin Kothari
07/26/2021, 12:36 PMAhmed
07/26/2021, 12:37 PMJemin Kothari
07/26/2021, 12:39 PMAhmed
07/26/2021, 2:10 PMAhmed
07/26/2021, 4:08 PMapps/bridge-api/src/generated/types
Jemin Kothari
08/20/2021, 11:07 AMJemin Kothari
08/20/2021, 11:24 AMAhmed
08/20/2021, 11:25 AM