The GraphQL PSM defines a single schema definition file for the ALMAS Data Model, ALMAS Management and ALMAS Client Callbacks packages defined by the PIM. Classes from the ALMAS Dtaa Model of the PIM are mapped to GraphQL types within the schema.
The detailed rules for the MDA code generation from the ALMAS Data Model PIM to the GraphQL PSM schema are as follows:
·	The PIM attributes are mapped to GraphQL attributes;
·	PIM attributes with multiplicity 1 are mapped to non-nullable GraphQL attributes
·	Collections in the PIM are mapped to GraphQL arrays;
·	Aggregation and compositions are mapped to GraphQL attributes;
·	Association classes follow the equivalent mapping as the CORBA and DDS PSMs
The schema supports GraphQL clients for interfaces defined in the ALMAS Management and ALMAS Client Callbacks PIM packages. Mutations are used to invoke PIM interface methods; queries and subscriptions are used to process those invocations.
The PSM method for connecting to other components is through the underlying HTTPS web service connection. Web-sockets are used for subscription callbacks.
Specific rules for the MDA code generation from the Service Model PIM to the GraphQL PSM IDL are as follows:
·	Interface method (in) parameters and return values (including out parameters) in the Service Model are each mapped to a (query) type, an input type and update type; these are for queries, mutations and subscriptions respectively.
·	To invoke a method an ALMAS client makes a mutation (with method parameter type) and subscribes or queries for the response (with the return value type).
·	To process a method an ALMAS client queries or subscribes for the method parameter type and makes a mutation with the response (with the return value type).
·	As per the DDS PSM, each of the parameter and return value types contain a request id; the instigator is responsible for allocating unique request ids in the scope of the ALMAS system; the processing component is responsible for labelling reponses with the received request id so that the instigator can locate the corresponding response.
·	The GraphQL schema Query type supports queries for any combination of interface methods in the Service Model.
·	The GraphQL schema Mutation type supports invocation of single or multiple instances of any combination of interface methods in the Service Model.
·	The GraphQL schema Subscription type supports subscription for any combination of interface methods in the Service Model.
·	The following methods are mapped to the return (out parameter) type with a GraphQL filter condition in the query: GetAlert, GetAlerts, GetTemplate and GetAllTemplateIDs
·	RegisterNotificationListener is mapped to a GraphQL subscription
·	Parameters of the operation RaiseAlertFromOverrides are implicitly defined as being optional in the PIM; in this PSM they are explicitly marked as optional using an IDL annotation.