mirror of
https://github.com/strapi/strapi.git
synced 2025-09-21 14:31:16 +00:00
Add publicationState only if received in the args
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
This commit is contained in:
parent
5f7fcafc5f
commit
60b52cf946
@ -224,6 +224,8 @@ const buildAssocResolvers = model => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(queryOpts);
|
||||||
|
|
||||||
const results = association.model
|
const results = association.model
|
||||||
? await strapi.plugins.graphql.services['data-loaders'].loaders[targetModel.uid].load(
|
? await strapi.plugins.graphql.services['data-loaders'].loaders[targetModel.uid].load(
|
||||||
{
|
{
|
||||||
@ -437,7 +439,7 @@ const buildCollectionType = model => {
|
|||||||
[pluralName]: async (parent, args, ctx, ast) => {
|
[pluralName]: async (parent, args, ctx, ast) => {
|
||||||
const results = await buildQuery(pluralName, resolverOpts)(parent, args, ctx, ast);
|
const results = await buildQuery(pluralName, resolverOpts)(parent, args, ctx, ast);
|
||||||
|
|
||||||
const __options__ = { _publicationState: args.publicationState };
|
const __options__ = _.pick(args, 'publicationState');
|
||||||
return assignOptions(results, { __options__ });
|
return assignOptions(results, { __options__ });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user