mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
use min/max version instead of one static version
This commit is contained in:
@@ -92,7 +92,8 @@ type Query {
|
||||
isNotificationScheduled(input: NotificationInput!): Boolean
|
||||
secondsThresholdForNotification(input: NotificationInput!): Int
|
||||
|
||||
schemaVersion: ID!
|
||||
schemaMinVersion: Int!
|
||||
schemaCurrentVersion: Int!
|
||||
}
|
||||
|
||||
# Mutations
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user