Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api-js/src/auth/__tests__/user-required.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('given a userLoaderByKey dataloader', () => {
const expectedCursor = await query`
FOR user IN users
FILTER user.userName == "test.account@istio.actually.exists"
RETURN user
RETURN MERGE({ id: user._key }, user)
`
const expectedUser = await expectedCursor.next()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('given the chartSummaryLoaderByKey function', () => {
const expectedCursor = await query`
FOR summary IN chartSummaries
FILTER summary._key == "web"
RETURN summary
RETURN MERGE({ id: summary._key }, summary)
`
const expectedSummary = await expectedCursor.next()

Expand All @@ -74,7 +74,7 @@ describe('given the chartSummaryLoaderByKey function', () => {
const expectedSummaries = []
const expectedCursor = await query`
FOR summary IN chartSummaries
RETURN summary
RETURN MERGE({ id: summary._key }, summary)
`

while (expectedCursor.hasNext()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports.chartSummaryLoaderByKey = (query, userId, i18n) =>
cursor = await query`
FOR summary IN chartSummaries
FILTER summary._key IN ${keys}
RETURN summary
RETURN MERGE({ id: summary._key }, summary)
`
} catch (err) {
console.error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('given a domainLoaderByDomain dataloader', () => {
const expectedCursor = await query`
FOR domain IN domains
FILTER domain.domain == "test.canada.ca"
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
`
const expectedDomain = await expectedCursor.next()

Expand All @@ -58,7 +58,7 @@ describe('given a domainLoaderByDomain dataloader', () => {
const expectedDomains = []
const expectedCursor = await query`
FOR domain IN domains
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
`

while (expectedCursor.hasNext()) {
Expand Down Expand Up @@ -89,7 +89,7 @@ describe('given a domainLoaderByDomain dataloader', () => {
const expectedCursor = await query`
FOR domain IN domains
FILTER domain.domain == "test.canada.ca"
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
`
const expectedDomain = await expectedCursor.next()

Expand All @@ -116,7 +116,7 @@ describe('given a domainLoaderByDomain dataloader', () => {
const expectedCursor = await query`
FOR domain IN domains
FILTER domain.domain == "test.canada.ca"
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
`
const expectedDomain = await expectedCursor.next()

Expand Down Expand Up @@ -159,7 +159,7 @@ describe('given a domainLoaderByDomain dataloader', () => {
const expectedCursor = await query`
FOR domain IN domains
FILTER domain.domain == "test.canada.ca"
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
`
const expectedDomain = await expectedCursor.next()

Expand All @@ -184,7 +184,7 @@ describe('given a domainLoaderByDomain dataloader', () => {
const expectedCursor = await query`
FOR domain IN domains
FILTER domain.domain == "test.canada.ca"
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
`
const expectedDomain = await expectedCursor.next()

Expand Down
12 changes: 6 additions & 6 deletions api-js/src/loaders/domains/__tests__/load-domain-by-key.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('given a domainLoaderByKey dataloader', () => {
const expectedCursor = await query`
FOR domain IN domains
FILTER domain.domain == "test.canada.ca"
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
`
const expectedDomain = await expectedCursor.next()

Expand All @@ -60,7 +60,7 @@ describe('given a domainLoaderByKey dataloader', () => {
const expectedDomains = []
const expectedCursor = await query`
FOR domain IN domains
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
`

while (expectedCursor.hasNext()) {
Expand Down Expand Up @@ -91,7 +91,7 @@ describe('given a domainLoaderByKey dataloader', () => {
const expectedCursor = await query`
FOR domain IN domains
FILTER domain.domain == "test.canada.ca"
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
`
const expectedDomain = await expectedCursor.next()

Expand All @@ -118,7 +118,7 @@ describe('given a domainLoaderByKey dataloader', () => {
const expectedCursor = await query`
FOR domain IN domains
FILTER domain.domain == "test.canada.ca"
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
`
const expectedDomain = await expectedCursor.next()

Expand Down Expand Up @@ -161,7 +161,7 @@ describe('given a domainLoaderByKey dataloader', () => {
const expectedCursor = await query`
FOR domain IN domains
FILTER domain.domain == "test.canada.ca"
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
`
const expectedDomain = await expectedCursor.next()

Expand All @@ -186,7 +186,7 @@ describe('given a domainLoaderByKey dataloader', () => {
const expectedCursor = await query`
FOR domain IN domains
FILTER domain.domain == "test.canada.ca"
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
`
const expectedDomain = await expectedCursor.next()

Expand Down
2 changes: 1 addition & 1 deletion api-js/src/loaders/domains/load-domain-by-domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports.domainLoaderByDomain = (query, userId, i18n) =>
cursor = await query`
FOR domain IN domains
FILTER domain.domain IN ${domains}
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
`
} catch (err) {
console.error(
Expand Down
2 changes: 1 addition & 1 deletion api-js/src/loaders/domains/load-domain-by-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports.domainLoaderByKey = (query, userId, i18n) =>
cursor = await query`
FOR domain IN domains
FILTER domain._key IN ${ids}
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
`
} catch (err) {
console.error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const domainLoaderConnectionsByOrgId = (
${afterTemplate}
${beforeTemplate}
${limitTemplate}
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
)

LET hasNextPage = (LENGTH(
Expand Down Expand Up @@ -168,7 +168,6 @@ const domainLoaderConnectionsByOrgId = (
}

const edges = domainsInfo.domains.map((domain) => {
domain.id = domain._key
return {
cursor: toGlobalId('domains', domain._key),
node: domain,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const domainLoaderConnectionsByUserId = (
${afterTemplate}
${beforeTemplate}
${limitTemplate}
RETURN domain
RETURN MERGE({ id: domain._key}, domain)
)

LET hasNextPage = (LENGTH(
Expand Down Expand Up @@ -163,7 +163,6 @@ const domainLoaderConnectionsByUserId = (
}

const edges = domainsInfo.domains.map((domain) => {
domain.id = domain._key
return {
cursor: toGlobalId('domains', domain._key),
node: domain,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('given the dkimLoaderByKey function', () => {
const expectedCursor = await query`
FOR dkimScan IN dkim
SORT dkimScan._key ASC LIMIT 1
RETURN dkimScan
RETURN MERGE({ id: dkimScan._key}, dkimScan)
`
const expectedDkim = await expectedCursor.next()

Expand All @@ -65,7 +65,7 @@ describe('given the dkimLoaderByKey function', () => {
const expectedDkimScans = []
const expectedCursor = await query`
FOR dkimScan IN dkim
RETURN dkimScan
RETURN MERGE({ id: dkimScan._key}, dkimScan)
`

while (expectedCursor.hasNext()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('given the dkimResultLoaderByKey function', () => {
const expectedCursor = await query`
FOR dkimResult IN dkimResults
SORT dkimResult._key ASC LIMIT 1
RETURN dkimResult
RETURN MERGE({ id: dkimResult._key }, dkimResult)
`
const expectedDkimResult = await expectedCursor.next()

Expand All @@ -65,7 +65,7 @@ describe('given the dkimResultLoaderByKey function', () => {
const expectedDkimResults = []
const expectedCursor = await query`
FOR dkimResult IN dkimResults
RETURN dkimResult
RETURN MERGE({ id: dkimResult._key }, dkimResult)
`

while (expectedCursor.hasNext()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('given the dmarcLoaderByKey function', () => {
const expectedCursor = await query`
FOR dmarcScan IN dmarc
SORT dmarcScan._key ASC LIMIT 1
RETURN dmarcScan
RETURN MERGE({ id: dmarcScan._key }, dmarcScan)
`
const expectedDmarc = await expectedCursor.next()

Expand All @@ -63,7 +63,7 @@ describe('given the dmarcLoaderByKey function', () => {
const expectedDkimScans = []
const expectedCursor = await query`
FOR dmarcScan IN dmarc
RETURN dmarcScan
RETURN MERGE({ id: dmarcScan._key }, dmarcScan)
`

while (expectedCursor.hasNext()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('given the spfLoaderByKey function', () => {
const expectedCursor = await query`
FOR spfScan IN spf
SORT spfScan._key ASC LIMIT 1
RETURN spfScan
RETURN MERGE({ id: spfScan._key }, spfScan)
`
const expectedSpf = await expectedCursor.next()

Expand All @@ -64,7 +64,7 @@ describe('given the spfLoaderByKey function', () => {
const expectedSpfScans = []
const expectedCursor = await query`
FOR spfScan IN spf
RETURN spfScan
RETURN MERGE({ id: spfScan._key }, spfScan)
`

while (expectedCursor.hasNext()) {
Expand Down
2 changes: 1 addition & 1 deletion api-js/src/loaders/email-scan/load-dkim-by-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports.dkimLoaderByKey = (query, userId, i18n) =>
cursor = await query`
FOR dkimScan IN dkim
FILTER dkimScan._key IN ${keys}
RETURN dkimScan
RETURN MERGE({ id: dkimScan._key}, dkimScan)
`
} catch (err) {
console.error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const dkimLoaderConnectionsByDomainId = (
${startDateTemplate}
${endDateTemplate}
${limitTemplate}
RETURN dkimScan
RETURN MERGE({ id: dkimScan._key }, dkimScan)
)

LET hasNextPage = (LENGTH(
Expand Down Expand Up @@ -176,7 +176,6 @@ const dkimLoaderConnectionsByDomainId = (
}

const edges = dkimScanInfo.dkimScans.map((dkimScan) => {
dkimScan.id = dkimScan._key
dkimScan.domainId = domainId
return {
cursor: toGlobalId('dkim', dkimScan._key),
Expand Down
2 changes: 1 addition & 1 deletion api-js/src/loaders/email-scan/load-dkim-result-by-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports.dkimResultLoaderByKey = (query, userId, i18n) =>
cursor = await query`
FOR dkimResult IN dkimResults
FILTER dkimResult._key IN ${keys}
RETURN dkimResult
RETURN MERGE({ id: dkimResult._key }, dkimResult)
`
} catch (err) {
console.error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const dkimResultsLoaderConnectionByDkimId = (
${afterTemplate}
${beforeTemplate}
${limitTemplate}
RETURN dkimResult
RETURN MERGE({ id: dkimResult._key }, dkimResult)
)

LET hasNextPage = (LENGTH(
Expand Down Expand Up @@ -155,7 +155,6 @@ const dkimResultsLoaderConnectionByDkimId = (
}

const edges = dkimResultsInfo.dkimResults.map((dkimResult) => {
dkimResult.id = dkimResult._key
dkimResult.dkimId = dkimId
return {
cursor: toGlobalId('dkimResult', dkimResult._key),
Expand Down
2 changes: 1 addition & 1 deletion api-js/src/loaders/email-scan/load-dmarc-by-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports.dmarcLoaderByKey = (query, userId, i18n) =>
cursor = await query`
FOR dmarcScan IN dmarc
FILTER dmarcScan._key IN ${keys}
RETURN dmarcScan
RETURN MERGE({ id: dmarcScan._key }, dmarcScan)
`
} catch (err) {
console.error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const dmarcLoaderConnectionsByDomainId = (
${startDateTemplate}
${endDateTemplate}
${limitTemplate}
RETURN dmarcScan
RETURN MERGE({ id: dmarcScan._key }, dmarcScan)
)

LET hasNextPage = (LENGTH(
Expand Down Expand Up @@ -169,7 +169,6 @@ const dmarcLoaderConnectionsByDomainId = (
}

const edges = dmarcScanInfo.dmarcScans.map((dmarcScan) => {
dmarcScan.id = dmarcScan._key
dmarcScan.domainId = domainId
return {
cursor: toGlobalId('dmarc', dmarcScan._key),
Expand Down
2 changes: 1 addition & 1 deletion api-js/src/loaders/email-scan/load-spf-by-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports.spfLoaderByKey = (query, userId, i18n) =>
cursor = await query`
FOR spfScan IN spf
FILTER spfScan._key IN ${keys}
RETURN spfScan
RETURN MERGE({ id: spfScan._key }, spfScan)
`
} catch (err) {
console.error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const spfLoaderConnectionsByDomainId = (
${startDateTemplate}
${endDateTemplate}
${limitTemplate}
RETURN spfScan
RETURN MERGE({ id: spfScan._key }, spfScan)
)

LET hasNextPage = (LENGTH(
Expand Down Expand Up @@ -167,7 +167,6 @@ const spfLoaderConnectionsByDomainId = (
}

const edges = spfScanInfo.spfScans.map((spfScan) => {
spfScan.id = spfScan._key
spfScan.domainId = domainId
return {
cursor: toGlobalId('spf', spfScan._key),
Expand Down
Loading