-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement issue creation subscription
In this update, a subscription for issue creation has been implemented, enabling real-time updates when an issue is created. This includes changes in the resolvers on the backend and updating some related GraphQL queries on the frontend. The dependencies were also updated to support this feature, with packages including "@graphql-tools/schema", "graphql-postgres-subscriptions", and "graphql-ws" added to backend and the "graphql-ws" version updated on the frontend.
- Loading branch information
1 parent
5fb8f2f
commit 26f5f86
Showing
14 changed files
with
279 additions
and
44 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,14 @@ | ||
import { PostgresPubSub } from 'graphql-postgres-subscriptions'; | ||
import pkg from 'pg'; | ||
|
||
import { SQL_URI } from './config.js'; | ||
|
||
const { Client } = pkg; | ||
|
||
const client = new Client({ | ||
connectionString: SQL_URI, | ||
}); | ||
await client.connect(); | ||
const pubsub = new PostgresPubSub({ client }); | ||
|
||
export default pubsub; |
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
Oops, something went wrong.