Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Update gatway subgraph using rover#295

Merged
nxtcoder17 merged 7 commits into
mainfrom
update/gatway-subgraph
Mar 12, 2024
Merged

Update gatway subgraph using rover#295
nxtcoder17 merged 7 commits into
mainfrom
update/gatway-subgraph

Conversation

@nxtcoder19
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey @nxtcoder19 - I've reviewed your changes and they look great!

General suggestions:

  • Consider using asynchronous file operations in the gateway application to enhance performance and avoid blocking the event loop.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Docstrings: all looks good

Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

Comment thread apps/gateway/src/index.js
};

const cfgMap = yaml.load(await fs.readFile(useEnv("SUPERGRAPH_CONFIG"), 'utf8'));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion (performance): Consider using asynchronous file reading with fs.promises.readFile instead of fs.readFileSync to avoid blocking the event loop, especially since this operation is performed at the startup.

Suggested change
-const superGraphSchema = fs.readFileSync("./prod-schema.graphql");
+const superGraphSchema = await fs.promises.readFile("./prod-schema.graphql", "utf-8");

@nxtcoder17 nxtcoder17 merged commit 4d52e86 into main Mar 12, 2024
@nxtcoder17 nxtcoder17 deleted the update/gatway-subgraph branch March 12, 2024 10:13
abdheshnayak pushed a commit that referenced this pull request Nov 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants