Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EDSC-3571: Adds dataloader for collection queries nested under granules #26

Merged
merged 6 commits into from
Nov 3, 2022

Conversation

macrouch
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Oct 26, 2022

Codecov Report

Merging #26 (baf7f67) into main (bde59bf) will not change coverage.
The diff coverage is 100.00%.

❗ Current head baf7f67 differs from pull request most recent head 7fca6f2. Consider uploading reports for the commit 7fca6f2 to get more accurate results

@@            Coverage Diff            @@
##              main       #26   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           45        46    +1     
  Lines         1008      1063   +55     
  Branches       141       141           
=========================================
+ Hits          1008      1063   +55     
Impacted Files Coverage Δ
src/cmr/concepts/concept.js 100.00% <ø> (ø)
src/dataloaders/getCollectionsById.js 100.00% <100.00%> (ø)
src/datasources/collection.js 100.00% <100.00%> (ø)
src/datasources/collectionDraft.js 100.00% <100.00%> (ø)
src/datasources/collectionDraftProposal.js 100.00% <100.00%> (ø)
src/datasources/granule.js 100.00% <100.00%> (ø)
src/datasources/graphDb.js 100.00% <100.00%> (ø)
src/datasources/graphDbDuplicateCollections.js 100.00% <100.00%> (ø)
src/datasources/service.js 100.00% <100.00%> (ø)
src/datasources/subscription.js 100.00% <100.00%> (ø)
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@@ -29,7 +33,7 @@ export const ingestSubscription = async (params, headers, parsedInfo) => {
const subscription = new Subscription(headers, requestInfo, params)

// Contact CMR
await subscription.ingest(params, ingestKeys, headers)
subscription.ingest(params, ingestKeys, headers)
Copy link
Contributor

@eudoroolivares2016 eudoroolivares2016 Nov 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trying to understand: why does this not need an await since the ingest method is returning a promise?

` ingest(data, requestedKeys, providedHeaders) {
// eslint-disable-next-line no-param-reassign
data = mergeParams(data)

this.logKeyRequest(requestedKeys, 'ingest')

// Construct the promise that will ingest data into CMR
this.response = cmrIngest(
  this.getConceptType(),
  data,
  providedHeaders,
  this.ingestPath
)

}`

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need an await because the methods that use its response await, this was the only external call that had an await so I removed it.

const result = await dataSources.variableSource(args, headers, parseResolveInfo(info))
variables: async (source, args, context, info) => {
const { dataSources } = context

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra line

@abbottry abbottry merged commit 92077ec into main Nov 3, 2022
@macrouch macrouch deleted the EDSC-3571 branch November 8, 2022 20:16
@abbottry abbottry changed the title EDSC-3571: Adds redis cache for collection queries nested under granules EDSC-3571: Adds dataloader for collection queries nested under granules Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants