Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
updatedAt: { value: 'updatedAt' },
createdAt: { value: 'createdAt' },
},
}),
},
order: {
type: new GraphQLEnumType({
name: 'SortOrder',
values: {
ASC: { value: 'ASC' },
DESC: { value: 'DESC' },
},
}),
},
},
resolve: relay.createConnectionResolver({
target: ContentEntry,
before: async (findOptions, args, context) => {
const language = args.language || 'en';
const published = null;
const contentReleaseId = args.contentReleaseId || null;
const settings = await Settings.get();
const masterLocale = settings.masterLocale.id;
findOptions.attributes = {
include: [
[
sequelize.literal(
`(
SELECT "versionId" "vId" from "ContentEntry" "b"
WHERE "b"."entryId" = "ContentEntry"."entryId"
AND "b"."isPublished" = true AND "b"."language" = ${sequelize.escape(language)}