This set of docs contains most of the modules used in the system, however, some modules are not present here, they can be found in the other set of technical backend docs name docs_bin.
Below is a general overview of the current backend processes. The specifics of each module can be found under their name listed on the side.
To view a module or file listed please click on the name (which serves as a link). Sometimes, especially in the case for interfaces or contexts, there will be a screen with only a hyperlink and no substantial information. In those situations, please follow that link to reach the proper information.
These set of modules make up the back end of our system.
The back end is accessed through the Express server in "./src/server.ts". server: The main item here is app.post('graphql') which receives a post request with the necessary arguments for the query. The middleware for this post is the "serveGraphQLRequest" function imported from "./src/graphql". Server's task is to obtain post request then call "serveGraphQLRequest" which will execute the query and return.
serveGraphQLRequest: Imported to the server from "./src/graphql/index.ts".
Recieves:
-param source is the query itself, what user is looking for
-param operationName indicates which query will take place; which functions will be carried out
-param variableValues are values required for certain queries; e.g. specify paritcular health descriptor
-param contextValue is a custom object that specifies the user trying to access the data
Calls the "graphql" function from the GraphQL api. Renders the results of
the "graphql" function onto client side.
graphql: Imported from GraphQL api
Recieves:
- a graphql schema interface
- arguments passed into "serveGraphQLRequest"
This function uses the index in "src\graphql\resolvers" to call the
appropriate resolver for given query. Based on the query the resolver then
carries out appropriate tasks and returns requested data from the server.
graphql then returns the results returned by the resolvers.
resolvers:
- several modules contain "resolver" in their name. Each of these resolvers
are part of the GraphQL setup, they interact with the server and return
requested queries. Resolvers may either be just queries or might have
functions that carry out additional tasks.
Generated using TypeDoc