-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(@whook/example): add GraphQL server
- Loading branch information
Showing
13 changed files
with
406 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
packages/whook-create/src/services/__snapshots__/createWhook.test.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.
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
145 changes: 144 additions & 1 deletion
145
packages/whook-example/src/__snapshots__/index.test.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { | ||
initGetGraphQL, | ||
getGraphQLDefinition as baseDefinition, | ||
} from '@whook/graphql'; | ||
|
||
// Add authentication to the base getGraphQL endpoints that | ||
// would otherwise be public per default | ||
export const definition = { | ||
...baseDefinition, | ||
operation: { | ||
...baseDefinition.operation, | ||
|
||
security: [ | ||
{ | ||
bearerAuth: ['admin'], | ||
}, | ||
], | ||
}, | ||
}; | ||
|
||
export default initGetGraphQL; |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { | ||
initPostGraphQL, | ||
postGraphQLDefinition as baseDefinition, | ||
} from '@whook/graphql'; | ||
|
||
// Add authentication to the base postGraphQL endpoints that | ||
// would otherwise be public per default | ||
export const definition = { | ||
...baseDefinition, | ||
operation: { | ||
...baseDefinition.operation, | ||
|
||
security: [ | ||
{ | ||
bearerAuth: ['admin'], | ||
}, | ||
], | ||
}, | ||
}; | ||
|
||
export default initPostGraphQL; |
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
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