mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
Merge pull request #45 from brendan-ch/hotfix/update-schema-version-system
hotfix/update-schema-version-system
This commit is contained in:
@@ -92,7 +92,8 @@ type Query {
|
|||||||
isNotificationScheduled(input: NotificationInput!): Boolean
|
isNotificationScheduled(input: NotificationInput!): Boolean
|
||||||
secondsThresholdForNotification(input: NotificationInput!): Int
|
secondsThresholdForNotification(input: NotificationInput!): Int
|
||||||
|
|
||||||
schemaVersion: ID!
|
schemaMinVersion: Int!
|
||||||
|
schemaCurrentVersion: Int!
|
||||||
}
|
}
|
||||||
|
|
||||||
# Mutations
|
# Mutations
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { ServerContext } from "../ServerContext";
|
import { ServerContext } from "../ServerContext";
|
||||||
import { Resolvers } from "../generated/graphql";
|
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> = {
|
export const QueryResolvers: Resolvers<ServerContext> = {
|
||||||
Query: {
|
Query: {
|
||||||
@@ -48,8 +49,11 @@ export const QueryResolvers: Resolvers<ServerContext> = {
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
schemaVersion: async (_parent, _args, _contextValue, _info) => {
|
schemaMinVersion: async (_parent, _args, _contextValue, _info) => {
|
||||||
return GRAPHQL_SCHEMA_VERSION;
|
return GRAPHQL_SCHEMA_MIN_VERSION;
|
||||||
|
},
|
||||||
|
schemaCurrentVersion: async (_parent, _args, _contextValue, _info) => {
|
||||||
|
return GRAPHQL_SCHEMA_CURRENT_VERSION;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user