diff --git a/schema.graphqls b/schema.graphqls index 60a3d63..614bfa0 100644 --- a/schema.graphqls +++ b/schema.graphqls @@ -92,7 +92,8 @@ type Query { isNotificationScheduled(input: NotificationInput!): Boolean secondsThresholdForNotification(input: NotificationInput!): Int - schemaVersion: ID! + schemaMinVersion: Int! + schemaCurrentVersion: Int! } # Mutations diff --git a/src/resolvers/QueryResolvers.ts b/src/resolvers/QueryResolvers.ts index 5bbaed1..e1359ce 100644 --- a/src/resolvers/QueryResolvers.ts +++ b/src/resolvers/QueryResolvers.ts @@ -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 = { Query: { @@ -48,8 +49,11 @@ export const QueryResolvers: Resolvers = { 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; }, }, }