passes context locales by default to gql resolvers
This commit is contained in:
@@ -13,6 +13,8 @@ const getFind = (config, collection) => withDefaultLocale(
|
||||
model: collection.model,
|
||||
query: {},
|
||||
paginate: {},
|
||||
locale: context.locale,
|
||||
fallbackLocale: context.fallbackLocale,
|
||||
};
|
||||
|
||||
if (args.where) options.query.where = args.where;
|
||||
|
||||
@@ -12,6 +12,8 @@ const findByID = (config, collection) => withDefaultLocale(
|
||||
depth: 0,
|
||||
model: collection.model,
|
||||
id: args.id,
|
||||
locale: context.locale,
|
||||
fallbackLocale: context.fallbackLocale,
|
||||
};
|
||||
|
||||
if (args.locale) {
|
||||
|
||||
Reference in New Issue
Block a user