diff --git a/schema.graphqls b/schema.graphqls index a2a8eca..59915e2 100644 --- a/schema.graphqls +++ b/schema.graphqls @@ -87,6 +87,8 @@ type Query { isNotificationScheduled(input: NotificationInput!): Boolean secondsThresholdForNotification(input: NotificationInput!): Int + + schemaVersion: ID! } # Mutations diff --git a/src/resolvers/QueryResolvers.ts b/src/resolvers/QueryResolvers.ts index 08a415f..5bbaed1 100644 --- a/src/resolvers/QueryResolvers.ts +++ b/src/resolvers/QueryResolvers.ts @@ -1,6 +1,8 @@ import { ServerContext } from "../ServerContext"; import { Resolvers } from "../generated/graphql"; +const GRAPHQL_SCHEMA_VERSION = "1"; + export const QueryResolvers: Resolvers = { Query: { systems: async (_parent, args, contextValue, _info) => { @@ -46,5 +48,8 @@ export const QueryResolvers: Resolvers = { return null; }, + schemaVersion: async (_parent, _args, _contextValue, _info) => { + return GRAPHQL_SCHEMA_VERSION; + }, }, }