Closed pedrosimao closed 1 year ago
Ok, I think I have an idea of where the bug comes from. I was using the autocrud functions like this:
generateAllObjects({ include: ['Something'] })
generateAllQueries({ include: ['Something'] })
generateAllMutations({ include: ['Something'] })
Then I decided to try to remove those and manually creating each query, mutation and object like this:
builder.prismaObject('Something', SomethingObject)
builder.mutationFields(deleteOneSomethingMutation)
builder.mutationFields(createOneSomethingMutation)
...
And this seems to have fixed the issue. I am not sure why, but I guess it is some issue with the autocrud ...
@pedrosimao Thanks for your report This bug was introduced in the new autocrud implementation Just got fixed in version 0.5.2
Can you please check if this time is ok? :D
I am using the library with Next.JS and all recommended library versions. I can create an object using
createOneSomething
mutation without any issue. But when i try to usedeleteOneSomething
I get this error:While inspecting the code I have noticed this line of code
resolve: async (query, _root, args, _context, _info) =>
is passing undefined parameters.Weirdly, both
_context.prisma
andargs.where
seem to be undefined. Even more weird when the same does not happen with the create method.