mirror of
https://github.com/strapi/strapi.git
synced 2025-08-17 13:16:08 +00:00
Merge pull request #3416 from strapi/fix/custom-graphql-query
Fix primaryKey not found for custom resolvers
This commit is contained in:
commit
e79e110add
@ -286,14 +286,17 @@ module.exports = {
|
||||
Object.defineProperties(ctx, {
|
||||
query: {
|
||||
value: {
|
||||
...this.convertToParams(_.omit(opts, 'where'), model.primaryKey),
|
||||
...this.convertToParams(
|
||||
_.omit(opts, 'where'),
|
||||
model ? model.primaryKey : 'id'
|
||||
),
|
||||
...this.convertToQuery(opts.where),
|
||||
},
|
||||
writable: true,
|
||||
configurable: true,
|
||||
},
|
||||
params: {
|
||||
value: this.convertToParams(opts, model.primaryKey),
|
||||
value: this.convertToParams(opts, model ? model.primaryKey : 'id'),
|
||||
writable: true,
|
||||
configurable: true,
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user