-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: feeds collectionSlug through me auth for graphql resolver
- Loading branch information
1 parent
204b755
commit 9ee2f9c
Showing
4 changed files
with
24 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
async function me(_, __, context) { | ||
return this.operations.collections.auth.me({ req: context.req }); | ||
function me(collectionSlug: string): any { | ||
async function resolver(_, __, context) { | ||
return this.operations.collections.auth.me({ | ||
req: context.req, | ||
collectionSlug, | ||
}); | ||
} | ||
|
||
const meResolver = resolver.bind(this); | ||
|
||
return meResolver; | ||
} | ||
|
||
export default me; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters