mirror of
https://github.com/strapi/strapi.git
synced 2025-11-10 07:10:11 +00:00
Fix multiple query in one graphql request
This commit is contained in:
parent
ed3fc1aebf
commit
84b41f407e
@ -261,12 +261,22 @@ module.exports = {
|
|||||||
// cause a lost of the Object prototype.
|
// cause a lost of the Object prototype.
|
||||||
const opts = this.amountLimiting(_options);
|
const opts = this.amountLimiting(_options);
|
||||||
|
|
||||||
ctx.query = {
|
Object.defineProperty(ctx, 'query', {
|
||||||
...this.convertToParams(_.omit(opts, 'where')),
|
enumerable: true,
|
||||||
...this.convertToQuery(opts.where),
|
configurable: true,
|
||||||
};
|
writable: true,
|
||||||
|
value: {
|
||||||
|
...this.convertToParams(_.omit(opts, 'where')),
|
||||||
|
...this.convertToQuery(opts.where),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
ctx.params = this.convertToParams(opts);
|
Object.defineProperty(ctx, 'params', {
|
||||||
|
enumerable: true,
|
||||||
|
configurable: true,
|
||||||
|
writable: true,
|
||||||
|
value: this.convertToParams(opts),
|
||||||
|
});
|
||||||
|
|
||||||
// Execute policies stack.
|
// Execute policies stack.
|
||||||
const policy = await compose(policiesFn)(ctx);
|
const policy = await compose(policiesFn)(ctx);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user