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

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