Open medz opened 3 weeks ago
omitApi
Protocol 1 (omit(true)):
{ modelName: 'User', action: 'findMany', previewFeatures: ['omitApi'], args: { omit: { name: true } }, }
->
{ "modelName": "User", "action": "findMany", "query": { "arguments": {}, "selection": { "$composites": true, "$scalars": true, "name": false } } }
Protocol 2 (omit(false)):
{ modelName: 'User', action: 'findMany', previewFeatures: ['omitApi'], args: { omit: { name: false } }, }
{ "modelName": "User", "action": "findMany", "query": { "arguments": {}, "selection": { "$composites": true, "$scalars": true, "name": true } } }
Protocel 3 (omit + include):
{ modelName: 'User', action: 'findMany', previewFeatures: ['omitApi'], args: { include: { posts: { omit: { title: true } } } }, } { "modelName": "User", "action": "findMany", "query": { "arguments": {}, "selection": { "$composites": true, "$scalars": true, "posts": { "arguments": {}, "selection": { "$composites": true, "$scalars": true, "title": false } } } } }
More see 👉 https://github.com/prisma/prisma/pull/23770/files#diff-ff0c0eab8c9ab531a46770b84e6254a67f0cf40fb9d4ceb1c5f7c17f497c1633
omitApi
include to https://github.com/prisma/prisma/releases/tag/5.13.0 in preview.Protocol 1 (omit(true)):
->
Protocol 2 (omit(false)):
->
Protocel 3 (omit + include):
More see 👉 https://github.com/prisma/prisma/pull/23770/files#diff-ff0c0eab8c9ab531a46770b84e6254a67f0cf40fb9d4ceb1c5f7c17f497c1633