diff --git a/imports/plugins/core/system-info/server/no-meteor/queries/systemInformation.js b/imports/plugins/core/system-info/server/no-meteor/queries/systemInformation.js index 68d4380c14f..e17be901ca2 100644 --- a/imports/plugins/core/system-info/server/no-meteor/queries/systemInformation.js +++ b/imports/plugins/core/system-info/server/no-meteor/queries/systemInformation.js @@ -1,16 +1,21 @@ import packageJson from "/package.json"; +import ReactionError from "@reactioncommerce/reaction-error"; + /** * @name queries.systemInformation * @method * @memberof SystemInformation/GraphQL * @summary get systemInformations + * @param {String} args.shopId The ID of the shop to load settings for * @param {Object} context - an object containing the per-request state * @return { ({ name, version })) }; } diff --git a/imports/plugins/core/system-info/server/no-meteor/resolvers/Query/systemInformation.js b/imports/plugins/core/system-info/server/no-meteor/resolvers/Query/systemInformation.js index 8ecc8c0c479..af97b6cc7a6 100644 --- a/imports/plugins/core/system-info/server/no-meteor/resolvers/Query/systemInformation.js +++ b/imports/plugins/core/system-info/server/no-meteor/resolvers/Query/systemInformation.js @@ -1,13 +1,15 @@ +import { decodeShopOpaqueId } from "@reactioncommerce/reaction-graphql-xforms/shop"; + /** * @name Query.systemInformation * @method * @memberof SystemInformation/GraphQL * @summary get system information for reaction site * @param {ConnectionArgs} args An object of all arguments that were sent by the client - * @param {String} args.shopId The ID of the shop to load navigation items for * @param {Object} context An object containing the per-request state * @return {} System Information Object */ export default async function systemInformation(_, args, context) { - return context.queries.systemInformation(context); + const dbShopId = decodeShopOpaqueId(args.shopId); + return context.queries.systemInformation(dbShopId, context); } diff --git a/imports/plugins/core/system-info/server/no-meteor/schemas/schema.graphql b/imports/plugins/core/system-info/server/no-meteor/schemas/schema.graphql index 550511d355d..9abb0034d62 100644 --- a/imports/plugins/core/system-info/server/no-meteor/schemas/schema.graphql +++ b/imports/plugins/core/system-info/server/no-meteor/schemas/schema.graphql @@ -1,16 +1,21 @@ extend type Query { - systemInformation: SystemInfo + systemInformation(shopId: ID!): SystemInformation! } "Represents Reaction Plugin" type Plugin { - name: String, + # name of plugin + name: String + # version of plugin version: String } "Represents Reaction System Infomation" -type SystemInfo { +type SystemInformation { # core api version - apiVersion: String, + apiVersion: String + # TODO: data version + # TODO: mongo version + #plugins installed with name, version information plugins:[Plugin] }