Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions modules/server/src/network/resolvers/aggregations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,13 @@ const convertFieldsToString = (requestedFields: RequestedFieldsMap) => {
};

/**
* Query string creation
* Creates individual GQL query string for a node.
* Includes aggregation GQL arguments (actual data is provided alongside query, not here)
* Requested fields are converted to GQL style strings
*
* @param documentName
* @param requestedFields
* @returns
* @returns constructed query string
*/
export const createNodeQueryString = (
documentName: string,
Expand Down
5 changes: 4 additions & 1 deletion modules/server/src/network/resolvers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export type NetworkSearchRoot = {
aggregations: Record<string, unknown>;
};

/*
* Type should match the "Network" GQL type definition arg types
*/
export type NetworkAggregationArgs = {
filters?: object;
aggregations_filter_themselves?: boolean;
Expand All @@ -33,7 +36,7 @@ export const createResolvers = (configs: NodeConfig[]) => {
Query: {
network: async (
parent: NetworkSearchRoot,
// type should match gql typedefs
// as mentioned above, type should match gql typedefs
args: NetworkAggregationArgs,
context: unknown,
info: GraphQLResolveInfo,
Expand Down