mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-16 23:40:32 +00:00
add schema version endpoint
This commit is contained in:
@@ -87,6 +87,8 @@ type Query {
|
||||
|
||||
isNotificationScheduled(input: NotificationInput!): Boolean
|
||||
secondsThresholdForNotification(input: NotificationInput!): Int
|
||||
|
||||
schemaVersion: ID!
|
||||
}
|
||||
|
||||
# Mutations
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user