-
Notifications
You must be signed in to change notification settings - Fork 0
Update GraphQL API baseURL to api.iq.wiki #106
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
Conversation
🦋 Changeset detectedLatest commit: 6431997 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @Royal-lobster, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
Hello team, Gemini here to provide a quick summary of this pull request. The primary goal of this PR, as indicated by the title and description, is to update the base URL used for making GraphQL API requests within the application. This change is necessary to point the application towards the new api.iq.wiki domain for GraphQL services, moving away from the older graph.everipedia.org endpoint.
Highlights
- GraphQL API Endpoint Update: The core change involves modifying the
baseURLconfiguration for theaxiosinstance responsible for GraphQL API calls. The endpoint is being updated fromhttps://graph.everipedia.org/graphqltohttps://api.iq.wiki/graphql.
Changelog
- src/lib/wiki-helpers.ts
- Updated the
baseURLfor theapiaxios instance (used for GraphQL requests) fromhttps://graph.everipedia.org/graphqltohttps://api.iq.wiki/graphqlon line 186.
- Updated the
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Old link now is gone,
New API domain waits,
Code points to new home.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
Thanks for this update! The change to the GraphQL API baseURL is clear and directly addresses the goal stated in the pull request title and description. Assuming https://api.iq.wiki/graphql is the correct new endpoint, this change should function as intended. I have one suggestion regarding how this URL is configured, aimed at improving long-term maintainability.
Summary of Findings
- Configuration Management: The GraphQL API
baseURLis hardcoded insrc/lib/wiki-helpers.ts. It's recommended to use an environment variable for such configurations to improve flexibility and maintainability across different deployment environments. A fallback to the default URL can be provided if the environment variable is not set.
Merge Readiness
The pull request makes a straightforward update to the API endpoint. However, to enhance maintainability and align with best practices for configuration management, I recommend addressing the suggestion to use an environment variable for the baseURL. This is a medium-severity concern. Once this is considered or addressed, the PR should be in good shape. As a reviewer, I am not authorized to approve pull requests, so please ensure further review and approval as per your team's process.
|
|
||
| export const api = axios.create({ | ||
| baseURL: "https://graph.everipedia.org/graphql", | ||
| baseURL: "https://api.iq.wiki/graphql", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new baseURL is hardcoded. While this works, it's generally better practice to configure such URLs through environment variables. This approach offers several benefits:
- Flexibility: Easily switch between different API endpoints for development, staging, and production environments without code changes.
- Maintainability: Centralizes configuration, making it easier to update URLs without searching through the codebase.
- Security: Avoids committing potentially sensitive or environment-specific URLs directly into the repository (though this specific URL is public).
Have you considered using an environment variable for this baseURL? You could provide a fallback to the current URL if the environment variable isn't set.
| baseURL: "https://api.iq.wiki/graphql", | |
| baseURL: process.env.NEXT_PUBLIC_GRAPHQL_API_BASEURL || "https://api.iq.wiki/graphql", |
Changes