use min/max version instead of one static version

This commit is contained in:
2025-04-24 09:56:36 -07:00
parent 058b0d490f
commit 9969e93fc9
2 changed files with 9 additions and 4 deletions

View File

@@ -1,7 +1,8 @@
import { ServerContext } from "../ServerContext";
import { Resolvers } from "../generated/graphql";
const GRAPHQL_SCHEMA_VERSION = "1";
const GRAPHQL_SCHEMA_MIN_VERSION = 1;
const GRAPHQL_SCHEMA_CURRENT_VERSION = 1;
export const QueryResolvers: Resolvers<ServerContext> = {
Query: {
@@ -48,8 +49,11 @@ export const QueryResolvers: Resolvers<ServerContext> = {
return null;
},
schemaVersion: async (_parent, _args, _contextValue, _info) => {
return GRAPHQL_SCHEMA_VERSION;
schemaMinVersion: async (_parent, _args, _contextValue, _info) => {
return GRAPHQL_SCHEMA_MIN_VERSION;
},
schemaCurrentVersion: async (_parent, _args, _contextValue, _info) => {
return GRAPHQL_SCHEMA_CURRENT_VERSION;
},
},
}