Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodlenet
nodejs-services
Commits
ce012665
Commit
ce012665
authored
Oct 14, 2020
by
aleclofabbro
Browse files
$sort placeholder, moreQueries 0
parent
c5006efb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/gql-graph/mongo/buildMongoPipeline.ts
View file @
ce012665
...
...
@@ -29,7 +29,7 @@ export const buildMongoPipeline = (docS: DocumentSelection, notTop?: boolean) =>
notTop
&&
unionLookupPipeline
.
push
({
$match
:
{
$expr
:
{
$eq
:
[
`$_id`
,
'
$$edgeSide
'
]
}
}
})
}
}
unionLookupPipeline
.
push
({
$sort
:
{
__typename
:
1
,
username
:
1
}
})
//
unionLookupPipeline.push({ $sort: { __typename: 1, username: 1 } })
field
.
lookups
.
forEach
((
fieldLookup
,
index
)
=>
{
const
$match
=
{
$and
:
[{
__typename
:
fieldLookup
.
__typename
}]
as
any
[]
}
fieldLookup
.
match
&&
$match
.
$and
.
push
(
renameMatchFields
(
fieldLookup
.
match
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment