Skip to content

Conversation

@Royal-lobster
Copy link
Member

Changes

  • Update GraphQL API baseURL to api.iq.wiki

@changeset-bot
Copy link

changeset-bot bot commented May 27, 2025

🦋 Changeset detected

Latest commit: 6431997

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@everipedia/iq-utils Patch

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

Copy link

@gemini-code-assist gemini-code-assist bot left a 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 baseURL configuration for the axios instance responsible for GraphQL API calls. The endpoint is being updated from https://graph.everipedia.org/graphql to https://api.iq.wiki/graphql.

Changelog

  • src/lib/wiki-helpers.ts
    • Updated the baseURL for the api axios instance (used for GraphQL requests) from https://graph.everipedia.org/graphql to https://api.iq.wiki/graphql on line 186.
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

  1. 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.

@Royal-lobster Royal-lobster merged commit a53206a into main May 27, 2025
1 check passed
Copy link

@gemini-code-assist gemini-code-assist bot left a 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 baseURL is hardcoded in src/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",

Choose a reason for hiding this comment

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

medium

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.

Suggested change
baseURL: "https://api.iq.wiki/graphql",
baseURL: process.env.NEXT_PUBLIC_GRAPHQL_API_BASEURL || "https://api.iq.wiki/graphql",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants