add schema version endpoint

This commit is contained in:
2025-04-16 16:55:00 -07:00
parent 2092827d37
commit cb05d3ca03
2 changed files with 7 additions and 0 deletions

View File

@@ -87,6 +87,8 @@ type Query {
isNotificationScheduled(input: NotificationInput!): Boolean isNotificationScheduled(input: NotificationInput!): Boolean
secondsThresholdForNotification(input: NotificationInput!): Int secondsThresholdForNotification(input: NotificationInput!): Int
schemaVersion: ID!
} }
# Mutations # Mutations

View File

@@ -1,6 +1,8 @@
import { ServerContext } from "../ServerContext"; import { ServerContext } from "../ServerContext";
import { Resolvers } from "../generated/graphql"; import { Resolvers } from "../generated/graphql";
const GRAPHQL_SCHEMA_VERSION = "1";
export const QueryResolvers: Resolvers<ServerContext> = { export const QueryResolvers: Resolvers<ServerContext> = {
Query: { Query: {
systems: async (_parent, args, contextValue, _info) => { systems: async (_parent, args, contextValue, _info) => {
@@ -46,5 +48,8 @@ export const QueryResolvers: Resolvers<ServerContext> = {
return null; return null;
}, },
schemaVersion: async (_parent, _args, _contextValue, _info) => {
return GRAPHQL_SCHEMA_VERSION;
},
}, },
} }