Jeanre Swanepoel
08/04/2020, 11:27 AMJeanre Swanepoel
08/04/2020, 11:27 AMJeanre Swanepoel
08/04/2020, 11:40 AMzth
08/04/2020, 12:46 PMzth
08/04/2020, 12:47 PMveksen
08/04/2020, 5:09 PM// order by `age` descending and then by `name` ascending
const users = await prisma.user.findMany({
orderBy: {
age: 'desc',
name: 'asc'
}
})
Michael Aubry
08/04/2020, 8:54 PMMichael Aubry
08/04/2020, 9:14 PMMichael Aubry
08/04/2020, 10:45 PMg
08/04/2020, 10:51 PMCharles Gaudreau Jackson
08/05/2020, 12:55 AMprisma deploy
- what can I do?Al
08/05/2020, 5:21 AMModelWhereInput
of Prisma 2 accept for string
(for example) type name: String | StringFilter
.
I'm trying to recreate the same input object with nexus, but seems if there where multiple inputs with same name, the last input will override the others
schema.inputObjectType({
name: 'StringFilter',
definition(t) {
t.string('equals')
t.string('contains')
},
})
schema.inputObjectType({
name: 'ModelWhereMany',
definition(t) {
t.string('name')
t.field('name', {type:'StringFilter'})
},
})
schema.objectType({
name: "Query",
definition(t) {
t.field("findManyModel", {
type: "Model",
args: {
where: schema.arg('ModelWhereMany')
},
async resolve() // other code
}
});
So in this case I have only StringFilter
There is a workaround for that or could be a new feature?Adri V.
08/05/2020, 3:08 PMconst filterSuggestions = async (_, { input }, { db, me, utils }) => {
try {
if (!input.archived) {
input.archived = false;
}
return await db.suggestion.findMany({
where: {
AND: [
{ status: input.status },
{ category: input.category },
{ priority: input.priority },
{ archived: input.archived }
]
}
});
So far, as you can see only if input contains a valid value for all of the filter options it will work. Is there a way to implement it correctly?Pieter
08/05/2020, 6:54 PMcompanies
or userProfiles
table. When I run prisma introspect
it generates models that matches the table names, which results in nexus
generating "singular" and plural typings for the models, both being the actual table and model names (plural) so it results in duplicates in the typescript typings which means code doesn't compile.
I got over 3000 lines generated by prisma introspect and there's no proper intellisense to rename a model and all fields related to itDaan Helsloot
08/05/2020, 7:16 PMGraphQLClient {
url: '<https://api.devprtcl.com/v1/graphql>',
options: { headers: { Accept: 'application/json' } }
}
The response:
Error: GraphQL Error(Code: 200): {
"response": {
"error": "{\"data\":{\"property_authentication\":[{\"property\":\"0xcEBD1BF31DF3E3697Ea26e2F94F9E3644C809F46\"}]}}",
"status": 200
},
"request": {
"query": "{ property_authentication(where: {authentication_id: {_eq: \"vue-i18n\"}}) {\n\t\tproperty\n\t }\n\t}"
}
}
at GraphQLClient. < anonymous > (/home/daan / badge / node_modules / graphql - request / dist / index.js: 134: 35)
at step(/home/daan / badge / node_modules / graphql - request / dist / index.js: 44: 23)
at Object.next(/home/daan / badge / node_modules / graphql - request / dist / index.js: 25: 53)
at fulfilled(/home/daan / badge / node_modules / graphql - request / dist / index.js: 16: 58)
at processTicksAndRejections(internal / process / task_queues.js: 97: 5)
Tracy (aboutsnack.com)
08/06/2020, 5:40 AMTracy (aboutsnack.com)
08/06/2020, 5:40 AMVenkat
08/06/2020, 7:53 AMGuillermo
08/06/2020, 10:14 AMToni Vaakanainen
08/06/2020, 10:15 AMToni Vaakanainen
08/06/2020, 10:15 AMToni Vaakanainen
08/06/2020, 10:16 AMGuillermo
08/06/2020, 10:17 AMlawjolla
08/06/2020, 7:23 PMdanhoang
08/06/2020, 9:43 PMSuhail
08/07/2020, 6:08 AMPieter
08/07/2020, 10:09 AMPieter
08/07/2020, 11:45 AMhandler
so it gets re-used, which makes perfect sense. I'm not aware of how to extract handler functions etc inside a function running on vercel.Devin Henkel-Legare
08/07/2020, 7:24 PMborrow3d_Cod3
08/08/2020, 3:43 PM