There appears to be a discrepancy in the naming convention between queries and mutations for pascal-cased models.
Scenario:
Imagine a model called ExecutionLog in Prisma 2:
model ExecutionLog {
id String @default(cuid()) @id @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
When I'm using that with nexus, I see that it generates the following queries and mutations:
t.crud.createOneExecutionLog();
t.crud.deleteOneExecutionLog();
t.crud.updateOneExecutionLog();
The discrepancy comes in the queries section where it changes the case of the L from upper to lowercase. This means that the queries have a lowercase l which means that if I want to preserve the same case I have to do the following:
t.crud.executionlogs({ alias: 'executionLogs' });
t.crud.executionlog({ alias: 'executionLog' });
I'm not arguing for the upper or lower case L here, but I'm just saying that it might be less confusing if we kept the same convention in both the queries and mutations. This is definitely a small trivial issue but I thought I'd point it out.
Ooops, you're right @CaptainChemist. We should fix this ASAP as it'll result in a breaking change. Adding that to our sprint 馃檹 cc @jasonkuhrt
Marking this as medium impact as there is a clear workaround. High impact would be security or crash affecting many users in most situations, a problem that cannot be worked around, and so on.
Most helpful comment
Ooops, you're right @CaptainChemist. We should fix this ASAP as it'll result in a breaking change. Adding that to our sprint 馃檹 cc @jasonkuhrt