mirror of
https://github.com/unraid/api.git
synced 2026-01-06 16:49:49 -06:00
chore: add a prefix scalar instead of prefix plugin (#1361)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new `PrefixedID` scalar type for all GraphQL IDs, ensuring unique identifiers across multiple servers by prefixing IDs with a server identifier. - Added detailed documentation for the `PrefixedID` scalar in the API schema. - Grouped VM and parity check mutations under dedicated fields for better organization. - Added new scalar `Port` and input type `AccessUrlInput` for improved type safety. - **Refactor** - Replaced all usages of standard `ID` or `String` with `PrefixedID` for IDs in queries, mutations, and models. - Consolidated ID handling by extending a common `Node` base class across models, removing redundant `id` declarations. - Updated GraphQL argument types and resolver signatures to explicitly use `PrefixedID`. - Updated GraphQL code generation to map `PrefixedID` to TypeScript `string`. - **Bug Fixes** - Enhanced test assertions to verify API key creation timestamps are strings. - Fixed internal property naming for registration ID. - **Chores** - Removed legacy ID prefix Apollo Server plugin in favor of the new scalar approach. - Cleaned up imports and unused fields related to ID handling. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -35,7 +35,7 @@ export const getNotifications = graphql(/* GraphQL */ `
|
||||
`);
|
||||
|
||||
export const archiveNotification = graphql(/* GraphQL */ `
|
||||
mutation ArchiveNotification($id: String!) {
|
||||
mutation ArchiveNotification($id: PrefixedID!) {
|
||||
archiveNotification(id: $id) {
|
||||
...NotificationFragment
|
||||
}
|
||||
@@ -59,7 +59,7 @@ export const archiveAllNotifications = graphql(/* GraphQL */ `
|
||||
`);
|
||||
|
||||
export const deleteNotification = graphql(/* GraphQL */ `
|
||||
mutation DeleteNotification($id: String!, $type: NotificationType!) {
|
||||
mutation DeleteNotification($id: PrefixedID!, $type: NotificationType!) {
|
||||
deleteNotification(id: $id, type: $type) {
|
||||
archive {
|
||||
total
|
||||
|
||||
Reference in New Issue
Block a user